Access VBA send mail corrupts PDF

I have VBA code that sends PDF documents, if I check the document before sending it looks fine but the recipient receives a corrupted version (Black lines and some pages completely black). BTW we use Exchange 2007

 Set objMessage = CreateObject("CDO.Message")  
    With objMessage
        .Subject = "Test"
        .From = "username@domain.com"
        .To = "username@domain.com"
                 
         objMessage.AddAttachment ("C:\Attach\sample.pdf")
 .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2     .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xxx.xxx.xxx.xxx"
       .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 2
        .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = "25"
        .Configuration.Fields.Update
       
        .Send
HKFueyAsked:
Who is Participating?
 
markmiddlemistCommented:
This is going to sound ridiculous, but I hit this problem some years ago, and the simple fix was to make sure we included some body text.

Hope this helps
0
 
HKFueyAuthor Commented:
FLIPPIN' BRILLIANT!!!!!
IF I COULD GIVE YOU MORE POINTS I WOULD!!!!!!!!!!!!
0
 
markmiddlemistCommented:
Glad to have spared you the pain we went through on it (trust me, there was lots LOL)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.