Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VC++ or VB to VFP Code
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01078483
Message ID:
01078489
Vues:
13
Hi Tracy,

Try this:
doclist = STRCONV(FULLPATH(firstform),5)+CHR(0)+;
          STRCONV(FULLPATH(nextform),5)+CHR(0)+CHR(0)
MartinJ

>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?
>
>
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform