Hello,
Is it possible to copy Gui to word document?
I opened word document using COM but I do not understand how to copy the Gui into the document.
Can someone please give me an example?
Thanks
Copy Gui to word document Topic is solved
Re: Copy Gui to word document Topic is solved
Word doc as template: https://autohotkey.com/boards/viewtopic ... 712#p84712
Search and replace in Word doc: https://autohotkey.com/boards/viewtopic ... 27#p235727
To get text from a GUI you can use GuiControlGet or Gui, Submit [, NoHide]
Search and replace in Word doc: https://autohotkey.com/boards/viewtopic ... 27#p235727
To get text from a GUI you can use GuiControlGet or Gui, Submit [, NoHide]
Re: Copy Gui to word document
Thank you Datapoint.
Your info helped me to understand my options better.
Eventually I decided to solved it by using regular copy/paste:
.
..
...
....
oWord := ComObjcreate("Word.Application")
MyDocNew := oWord.documents.Add()
Send, !{PrintScreen}
sleep, 1000
ClipWait, 1
oword.Selection.Paste
oWord.Visible := true
Item1Length := StrLen(Item1)
Item2Length := StrLen(Item2)
NewStr1 := SubStr(Item1, 1 , Item1Length )
NewStr2 := SubStr(Item2, 1 , Item2Length )
MyDocNew.Saveas("C:\Data\" NewStr1 " " NewStr2 ".docx")
oWord.Quit()
return
Your info helped me to understand my options better.
Eventually I decided to solved it by using regular copy/paste:
.
..
...
....
oWord := ComObjcreate("Word.Application")
MyDocNew := oWord.documents.Add()
Send, !{PrintScreen}
sleep, 1000
ClipWait, 1
oword.Selection.Paste
oWord.Visible := true
Item1Length := StrLen(Item1)
Item2Length := StrLen(Item2)
NewStr1 := SubStr(Item1, 1 , Item1Length )
NewStr2 := SubStr(Item2, 1 , Item2Length )
MyDocNew.Saveas("C:\Data\" NewStr1 " " NewStr2 ".docx")
oWord.Quit()
return
Who is online
Users browsing this forum: No registered users and 295 guests