Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement