Okay, I have a macro that is doing a decent job of taking an Access record, opening up Word, copying the record into the Word form, and then printing it.
Everything falls apart when I try to get it to print to a PDF. In Word, I recorded a simple Macro to see how it did that and tried to adjust it to fit the coding in the Access Macro. This is what I am getting:
Unfortunately, it is giving me the error:
Any ideas?
Everything falls apart when I try to get it to print to a PDF. In Word, I recorded a simple Macro to see how it did that and tried to adjust it to fit the coding in the Access Macro. This is what I am getting:
Code:
objWord.ActivePrinter = "Adobe PDF"
objWord.Application.PrintOut Filename:="C:\Documents and Settings\me\My Documents\output.pdf", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
Unfortunately, it is giving me the error:
Microsoft Office Access
5121
Word experienced an error trying to open the file.
Try these suggestions:
* Check the file permissions for the document or drive.
* Make sure there is sufficient free memory and disk space.
* Open the file with the Text Recovery converter.
Any ideas?