General information
Category:
Coding, syntax & commands
Title:
OLE Automation Syntax (Wordperfect VS Visual Foxpro)
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only