General information
Category:
Coding, syntax & commands
Hi
I am creating a word object as shown below but if its already open i get an error, how could I check to see if its already open first and if it is show it?
lcFilename = "myDoc.doc"
ON ERROR show_message('No word application found') && show message
oWord = createobject('Word.Application')
with oWord
ON ERROR show_message('Document not found')
.Documents.Open(lcFilename)
.visible=.t.
.Activate
endwith
ON ERROR && restore system error handler
Thanks
Nelly
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