Email Attached PDF created incorrectly

Varzoth

New member
Local time
Today, 05:45
Joined
Nov 8, 2019
Messages
8
If anyone can help me with this I'd really appreciate it.
On a report, I've made if a user prints (saves) it as a PDF it works fine, but if they use the option to have it attached to an email it adds in weird characters.

Normal one:
command :
DoCmd.RunCommand acCmdPrint

Odd characters:
command:
DoCmd.SendObject acReport, "TechVisitReport", "PDF", "", "", "", "Visit Report for: " & Forms!techVisitReport!Combo67 & ", Date: " & Forms!techVisitReport!Text17, "", True, ""

Is there a way to fix this or a way around the issue to attach a non-screwy pdf to an email?
 
The format parameter is not a string,it is:
AcFormatPdf
 
HI Ranman,

Thanks for your message

As in change the "PDF" to AcFormatPdf ?

Just tried this, still the same error :(
 
Hi. Welcome to AWF!

If you manually save the report to PDF using the Ribbon buttons, do you still get the odd characters?
 
Hmm, the only time I have seen those is if there are Line Breaks. Is that what is happening here?
 
Just for closure, the issue was some kind of hidden character form people copy-pasting from word. I resolved the issue by changing the text boxes from pain to rich text. I guess you could also write some VBA to remove any hidden chars.
 
Just for closure, the issue was some kind of hidden character form people copy-pasting from word. I resolved the issue by changing the text boxes from pain to rich text. I guess you could also write some VBA to remove any hidden chars.
Hi. Thanks for the update. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom