LukeA
01-05-2006, 02:30 AM
Hi guys,
I found a post on the forum from a while ago that showed how to save a document and then convert it to PDF saving it as the same file name.
There was an error in the line of code that a few people in the post spotted, but the author didn't show any replacement code.
I've tried searching on Google, within the forum and others, but can't find the best way of doing this.
At the moment, my code is;
Documents(1).SaveAs TempDocs & "\" & strOrderNum & "-" & strProdCode & "_" & strBatch
ActivePrinter = "Acrobat Distiller"
ActiveDocument.PrintOut
Basically I am saving the file using parameters within the word document. It then prints out to the acrobat distiller printer.
If I check "View result in Acrobat" in the printer properties, I can manually save the PDF, but I need this to be automated, with the same name and save in the same folder as the word doc.
Any ideas?
Regards,
Luke
I found a post on the forum from a while ago that showed how to save a document and then convert it to PDF saving it as the same file name.
There was an error in the line of code that a few people in the post spotted, but the author didn't show any replacement code.
I've tried searching on Google, within the forum and others, but can't find the best way of doing this.
At the moment, my code is;
Documents(1).SaveAs TempDocs & "\" & strOrderNum & "-" & strProdCode & "_" & strBatch
ActivePrinter = "Acrobat Distiller"
ActiveDocument.PrintOut
Basically I am saving the file using parameters within the word document. It then prints out to the acrobat distiller printer.
If I check "View result in Acrobat" in the printer properties, I can manually save the PDF, but I need this to be automated, with the same name and save in the same folder as the word doc.
Any ideas?
Regards,
Luke