General information
Category:
Coding, syntax & commands
Title:
OLE - Controlling Word97
I have an app that I need to populate bookmarked areas in Word. Getting the values into word is the easy part, trying to close word seems to cause problems.
Below is my code:
wrd = CREATEOBJECT("word.basic")
wrd.appmaximize
wrd.fileopen ("s:\kramer\arrest\sample.doc")
wrd.viewpage
wrd.ww7_EditGoTo("test1")
wrd.Insert("150")
wrd.FileClose()
wrd.application.quit
If I create the object as an application object, I get other errors, including the fileopen(). However, in this format, I can't quit word. I get an unknown name error on the "wrd.application.quit" line.
I have pulled some documents from technet and Microsoft but I haven't found an article that opens & closes a document without saving.
Thanks in advance.
Scott
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only