RARTIGAS
10-19-2004, 09:59 AM
:confused:
****o I am currently trying to convert Word Documents to PDF using Visual Basic 6.0 and the code Im using seems to be converting the document, but when I try to open the pdf I get this message:
Adobe Reader could not open 'BSXC70.pdf' because it is either not a supported file type or because the file has been corrupted.
BSX70 is the name of the pdf. However, if I do it manually from Word, it works fine. The code Im using is as follows:
objWordDoc.PrintOut Background:=0, Range:=wdPrintAllDocument, outputFilename:="C:\My Documents\PDF Files Test\BSX70.pdf",
Item:=wdPrintDocumentContent, Copies:=1, pagetype:=wdPrintAllPages, PrintToFile:=True, collate:=False
objWordDoc is the word document to change to pdf.
I tried it with just the Background and Range, eliminating the Output File Name and when I ran the program I got the Primo PDF screen that asks for a "save as" destination. I entered the folder path and it worked fine using the vb script. But the idea is to have the program select the destination path in code.
I dont know if this is too technical, but any help would be apreciated.
Thanx.
****o I am currently trying to convert Word Documents to PDF using Visual Basic 6.0 and the code Im using seems to be converting the document, but when I try to open the pdf I get this message:
Adobe Reader could not open 'BSXC70.pdf' because it is either not a supported file type or because the file has been corrupted.
BSX70 is the name of the pdf. However, if I do it manually from Word, it works fine. The code Im using is as follows:
objWordDoc.PrintOut Background:=0, Range:=wdPrintAllDocument, outputFilename:="C:\My Documents\PDF Files Test\BSX70.pdf",
Item:=wdPrintDocumentContent, Copies:=1, pagetype:=wdPrintAllPages, PrintToFile:=True, collate:=False
objWordDoc is the word document to change to pdf.
I tried it with just the Background and Range, eliminating the Output File Name and when I ran the program I got the Primo PDF screen that asks for a "save as" destination. I entered the folder path and it worked fine using the vb script. But the idea is to have the program select the destination path in code.
I dont know if this is too technical, but any help would be apreciated.
Thanx.