Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateNewDocument in Excel or Word
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01043559
Message ID:
01043574
Views:
8
Here is in addition to what other said.

CreateNewDocument method may be applied to the MailingLabel object, and to the Hyperlink object.
You may go to VBA for Word help (in Word, ALT+F11, F1) and explore the syntax and review examples.


>I need to create a Word or Excel document from VFP.
>I am trying to use "CreateNewDocument" but can't seam to get the proper writing
>
>Here is the code:
>
>*-*-*-*-*-*
>oWord = CREATEOBJECT( "word.application")
>lcDoc = "testword.doc"
>
>* I have tried
>oWord.CreateNewDocument("testword.doc", .T., .T.)
>* or
>oWord.CreateNewDocument(lcDoc, .T., .T.)
>
>*-*-*-*
>and quite a few different versions but I always get error messages.
>
>Can anyone tell me the proper way?
>Thanks
>Raymond Larche
Previous
Reply
Map
View

Click here to load this message in the networking platform