Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Automation Syntax (Wordperfect VS Visual Foxpro)
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
OLE Automation Syntax (Wordperfect VS Visual Foxpro)
Miscellaneous
Thread ID:
00039010
Message ID:
00039010
Views:
109
Is anybody trying to use OLE Automation between VFP and Wordperfect? I'm trying to get Wordperfect to fire up, load a particular document, and do a mail merge into a new workspace. The following almost works until it comes to the MergeRun statement:

LetterFile="D:\wpress\Letters\letter1A.frm"
MergeFile="D:\wpress\Letters\letter1A.dat"

oWP=createobject("Wordperfect.PerfectScript")
result=oWP.FileOpen(LetterFile)
result=oWP.MergeDataFile(MergeFile)
result=oWP.MergeSelect(0)
result=oWP.MergeRun(0,"",2,MergeFile,1)
result=oWP.Quit
release oWP

Can anyone help me with the syntax of the MergeRun line? (What it is supposed to do is merge the current document-- loaded with the FileOpen line-- with the MergeFile into a new work space.) Any help or suggestions would be appreciated.

Pat Keating
Reply
Map
View

Click here to load this message in the networking platform