Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance, Force
- oWord := ComObjCreate("Word.Application")
- oWord.Documents.Add
- oWord.Visible := 1
- Sleep 500
- oWord.Selection.Font.Bold := 1
- oWord.Selection.TypeText("Hello world!")
- oWord.Selection.Font.Bold := 0
- oWord.Selection.TypeParagraph
- Sleep 500
- oWord.Selection.TypeText("This is a simple example on how to use AHK and Word Objects.")
- Sleep 500
- MsgBox, 4, , Shall we close the window?
- IfMsgBox, Yes
- oWord.Quit()
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement