Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters to a method in 'word.application'
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Passing parameters to a method in 'word.application'
Miscellaneous
Thread ID:
00632467
Message ID:
00632467
Views:
52
I'm using MS Word Automation, all the documentation on how to use Word as an object is contained in the help file vbawrd9.chm, the problem is that the examples are written for Visual Basic, some methods seem to receive variable parameters stated by a variable name. How are these translated to VFP in order to work?

*--The Visual Basic Documentation for method open states this:
expresion.Open(FileName, ConfirmConversions, ReadOnly, AddToRecentFiles, PasswordDocument, PasswordTemplate, Revert, WritePasswordDocument, WritePasswordTemplate, Format, Encoding, Visible)

*--The corresponding Visual Basic Example is this:
oObject.Documents.Open FileName:="C:\Test.doc", Format:=3

Note that in VB example they send 2 parameters, so How do I pass these parameters in VFP?

I think that it should be some like this but it doesn't work:

*--VFP
oObject.Documents.Open([FileName:="Test.doc"],[Format:=3])
Jorge Flores
From the Amigo Country
Next
Reply
Map
View

Click here to load this message in the networking platform