I irade92 Registered User. Local time Today, 14:36 Joined Dec 26, 2010 Messages 229 Jul 18, 2014 #1 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
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
GinaWhipp AWF VIP Local time Today, 09:36 Joined Jun 21, 2011 Messages 5,876 Jul 18, 2014 #2 What happens when you try? Maybe you need to save the record first? Add... Code: DoCmd.RunCommand acCmdSaveRecord ...right before your DoCmd.OutputTo.
What happens when you try? Maybe you need to save the record first? Add... Code: DoCmd.RunCommand acCmdSaveRecord ...right before your DoCmd.OutputTo.
S sspreyer Registered User. Local time Today, 06:36 Joined Nov 18, 2013 Messages 251 Jul 18, 2014 #3 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: Jul 19, 2014
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
V vbaInet AWF VIP Local time Today, 13:36 Joined Jan 22, 2010 Messages 26,266 Jul 18, 2014 #4 What is the Invoice Number? And what problems are you actually experiencing?
I irade92 Registered User. Local time Today, 14:36 Joined Dec 26, 2010 Messages 229 Jul 19, 2014 #5 sspreyer said: 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 Click to expand... Thanks Shane...I got this message "The OutputTo Action was cancelled" ..so this is not working
sspreyer said: 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 Click to expand... Thanks Shane...I got this message "The OutputTo Action was cancelled" ..so this is not working
I irade92 Registered User. Local time Today, 14:36 Joined Dec 26, 2010 Messages 229 Jul 19, 2014 #6 vbaInet said: What is the Invoice Number? And what problems are you actually experiencing? Click to expand... 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
vbaInet said: What is the Invoice Number? And what problems are you actually experiencing? Click to expand... 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
V vbaInet AWF VIP Local time Today, 13:36 Joined Jan 22, 2010 Messages 26,266 Jul 19, 2014 #7 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.
I irade92 Registered User. Local time Today, 14:36 Joined Dec 26, 2010 Messages 229 Jul 19, 2014 #8 vbaInet said: 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. Click to expand... 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
vbaInet said: 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. Click to expand... 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
V vbaInet AWF VIP Local time Today, 13:36 Joined Jan 22, 2010 Messages 26,266 Jul 19, 2014 #9 Good job!