Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening existing Word doc in OLE container control
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00256395
Message ID:
00256427
Views:
24
>I would like to open an existing MS Word document on a VFP form to provide a crude help file for my application. If possible I would like the users to be able to basic Word functionality like Find and Print.
>

I believe I am a little closer. I am now using the following code:
thisform.addobject('loWordDoc','olecontrol','word.document')
thisform.loWordDoc.Height = thisform.height
thisform.loWordDoc.Width = thisform.width
thisform.loWordDoc.Top = thisform.top
thisform.loWordDoc.Left = thisform.left
thisform.loWordDoc.Visible = .t.
thisform.Show
thisform.loWordDoc.DoVerb(0)
loWord = thisform.loWordDoc.Object.Application.Documents.Open('c:\awork\brouter.doc')

I am now geting the following error message:
The open method or property is not available because this document is being edited by another application.
The file is not open by another application.

It is interesting to note that I get the same error message if I supply the name of a file that does not exist.

Any ideas?

Thanks!
Vern
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform