I have been using the following to open a doc file in VFP 8:
oWord = CREATEOBJECT("Word.Application")
oDocument = oWord.Documents.OPEN(MYLOCATION+'\'+C_FILE_NUM+'.DOC')
WITH oWord
.Application.WindowState = 1
.Application.Visible = .T.
ENDWITH
This work OK in XP even when I have another instance of Word open. It
creates another instance of word, opens the file up and displays it.
BUT When I use the same commands in VISTA and there is an instance of Word
on the taskbar it opens that instance file up as well as the new one and the
bad part is it puts the old file on top of the new file I am trying to open.
Is there any reason why in VISTA the CreateObject does not open up a new
instance of Word?? At least is there a way that I can get the new file I am
opening on top on the old file that was on the task bar??
Thanks for any help.
TonySper