Output to PDF

irade92

Registered User.
Local time
Today, 19:20
Joined
Dec 26, 2010
Messages
229
DoCmd.OutputTo acOutputReport, "rptINVOICE_PRINT", acFormatPDF, "C:\INVOICES\ " & ME.INVOICE & ".pdf", True


Why I can't output to pdf with Invoice number as title to .pdf file

Thanks in advance
 
What happens when you try? Maybe you need to save the record first? Add...

Code:
DoCmd.RunCommand acCmdSaveRecord
...right before your DoCmd.OutputTo.
 
hi
irade92

you could try this

Code:
myDir = "[COLOR=red]FILE PATH\[/COLOR]"
myFile1 = [[COLOR=red]TEXT BOX NAME[/COLOR] ] & ".PDF"
DoCmd.OutputTo acReport, "[COLOR=red]Report Name[/COLOR]", acFormatPDF, myDir & myFile1
hope this helps

shane
 
Last edited:
What is the Invoice Number? And what problems are you actually experiencing?
 
hi
irade92

you could try this

Code:
myDir = "[COLOR=red]FILE PATH\[/COLOR]"
myFile1 = [[COLOR=red]TEXT BOX NAME[/COLOR] ] & ".PDF"
DoCmd.OutputTo acReport, "[COLOR=red]Report Name[/COLOR]", acFormatPDF, myDir & myFile1
hope this helps

shane

Thanks Shane...I got this message "The OutputTo Action was cancelled" ..so this is not working
 
What is the Invoice Number? And what problems are you actually experiencing?

The Invoice Number can be this format "148/2014/OI" and this is a field in the Report, so I take the filed as title to output .pdf file i.e 148/2014/OI.pdf
 
Go to any of your documents and try to rename it to "148/2014/OI", any document will do. See if you're successful. I just want you to figure it out.
 
Go to any of your documents and try to rename it to "148/2014/OI", any document will do. See if you're successful. I just want you to figure it out.
Yes...you gave me idea..back slash ("/") cannot be in the name of the file...I resolved this by changing "146-2014-OI" instead of "146/2014/OI"

Thanks a lot...great
 

Users who are viewing this thread

Back
Top Bottom