choppysuey
Technical User
I'm interested in knowing what the best way is to open multiply word docs in vfp6. If I have 10 docs i.e. 1.doc, 2.doc, 3.doc, etc and want to open all of them I use the following simple loop.
lcSuffix = '.doc'
oWord = CREATEOBJECT('Word.Application')
FOR lnCounter=1 TO 10 STEP 1
oWord.documents.open(str(lnCounter)+lcSuffix)
ENDFOR
oWord.Visible
However doing so opens up 10 winword.exe processes. How do we go about opening a single instance of msword and then opening up the ten docs within that single instance. In addtion, how then do you reference each document?
Thanks in advance.
lcSuffix = '.doc'
oWord = CREATEOBJECT('Word.Application')
FOR lnCounter=1 TO 10 STEP 1
oWord.documents.open(str(lnCounter)+lcSuffix)
ENDFOR
oWord.Visible
However doing so opens up 10 winword.exe processes. How do we go about opening a single instance of msword and then opening up the ten docs within that single instance. In addtion, how then do you reference each document?
Thanks in advance.