Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VC++ or VB to VFP Code
Message
 
To
15/12/2005 17:14:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01078483
Message ID:
01078487
Views:
14
Tracy,

The docs don't specify what the delimiter should be, so I would guess a comma. You may need quotes around each file name:
doclist = ["] + FULLPATH(firstform) + [","] + FULLPATH(nextform) + ["]
or possibly try the various attempts passing the doclist by reference:
.MergeDocs(@doclist)
These are obviously just guesses though.

HTH,
Chad

>Trying to take help for VC++ and VB code and convert to VFP code.
>
>Here is the method help (from Gnostice activex pdf toolkit):
>
>
>The MergeDocs method is used to merge a list of PDF documents into a current document.
>
>Syntax
>   [VC++]
>        void MergeDocs(const VARIANT& DocList)
>   [VB]
>        Sub MergeDocs(DocList)
>Parameters
>   DocList
>   [in] Specifies list of filenames of the PDF documents to be merged. It is a VARIANT that contains a list of BSTRs (each BSTR being absolute pathname of the file to be merged).
>
>Here are some examples of my trials:
>
>*--Example of usage in my trials
>firstform = "c:\foxpro\tmp\_abcd.pdf"
>nextform = "c:\foxpro\tmp\_abcd_2.pdf"
>
>*--Trial one results in an OLE error code 0x8000ffff: Castastrophic failure
>IF FILE(FULLPATH(nextform))
>   IF nextform <> firstform
>	IF FILE(FULLPATH(firstform))
>  	   doclist = FULLPATH(firstform) + " " + FULLPATH(nextform)
>           *Doclist now equals "c:\foxpro\tmp\_abcd.pdf c:\foxpro\tmp\_abcd_2.pdf"
>	   WITH ofrmPDFTool.oPDFTool
>		.MergeDocs(doclist) && results in Castastrophic failure error
>	   ENDWITH
>	ENDIF
>   ENDIF
>ENDIF
>
>*--Trial two results in an OLE error code 0x8000ffff: Castastrophic failure
>IF FILE(FULLPATH(nextform))
>   IF nextform <> firstform
>	IF FILE(FULLPATH(firstform))
>  	   doclist = FULLPATH(firstform) + "," + FULLPATH(nextform)
>           *Doclist now equals "c:\foxpro\tmp\_abcd.pdf,c:\foxpro\tmp\_abcd_2.pdf"
>	   WITH ofrmPDFTool.oPDFTool
>		.MergeDocs(doclist) && results in Castastrophic failure error
>	   ENDWITH
>	ENDIF
>   ENDIF
>ENDIF
>
>*--Trial 3 results in an OLE error code 0x8000ffff: Castastrophic failure
>IF FILE(FULLPATH(nextform))
>   IF nextform <> firstform
>	IF FILE(FULLPATH(firstform))
>  	   doclist = FULLPATH(firstform) + ";" + FULLPATH(nextform)
>           *Doclist now equals "c:\foxpro\tmp\_abcd.pdf;c:\foxpro\tmp\_abcd_2.pdf"
>	   WITH ofrmPDFTool.oPDFTool
>		.MergeDocs(doclist) && results in Castastrophic failure error
>	   ENDWITH
>	ENDIF
>   ENDIF
>ENDIF
>
>*--The 4th trial results in an OLE error code 0x8002000e: Invalid number of parameters
>IF FILE(FULLPATH(nextform))
>   IF nextform <> firstform
>	IF FILE(FULLPATH(firstform))
>	   WITH ofrmPDFTool.oPDFTool
>		.MergeDocs(firstform,nextform) && results in invalid number of parameters error
>	   ENDWITH
>	ENDIF
>   ENDIF
>ENDIF
>
>
>Is there something wrong with the syntax in calling the mergedoc method? Should the documents be separated by semicolons, commas, or something else?
>
>
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform