Email Attached PDF created incorrectly (1 Viewer)

Varzoth

New member
Local time
Today, 05:14
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?
 

Ranman256

Well-known member
Local time
Today, 00:14
Joined
Apr 9, 2015
Messages
4,339
The format parameter is not a string,it is:
AcFormatPdf
 

Varzoth

New member
Local time
Today, 05:14
Joined
Nov 8, 2019
Messages
8
HI Ranman,

Thanks for your message

As in change the "PDF" to AcFormatPdf ?

Just tried this, still the same error :(
 

Ranman256

Well-known member
Local time
Today, 00:14
Joined
Apr 9, 2015
Messages
4,339
You can't have asterisk in filename
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:14
Joined
Oct 29, 2018
Messages
21,455
Hi. Welcome to AWF!

If you manually save the report to PDF using the Ribbon buttons, do you still get the odd characters?
 

GinaWhipp

AWF VIP
Local time
Today, 00:14
Joined
Jun 21, 2011
Messages
5,900
Hmm, the only time I have seen those is if there are Line Breaks. Is that what is happening here?
 

Varzoth

New member
Local time
Today, 05:14
Joined
Nov 8, 2019
Messages
8
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.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:14
Joined
Oct 29, 2018
Messages
21,455
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

Top Bottom