>>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 >>>>