Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateObject
Message
From
28/03/2002 06:21:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
CreateObject
Miscellaneous
Thread ID:
00638312
Message ID:
00638312
Views:
59
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
Map
View

Click here to load this message in the networking platform