CDO and PDF Files

J

Jeff

We're having some trouble with some PDF files sent to our customers,
they aren't able to be read because they are "damaged, and cannot be
repaired". Looking into this, I think it has to do with the encoding
we are using. We don't specify a type and I think it's defaulting to a
7-bit encoding, when I think we need 8.

First of all, does that sound right? If so, does anyone have an
example of how to specify the right encoding for PDF files? The
messages are in HTML format, with PDF files attached. We're using VB6
and CDO.

Thanks in advance....

Here is a snippit of the code we use.

With oMail

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= pSendUsingPickup

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= mRunOptions.SMTPServer

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= mRunOptions.SMTPServerPort

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")
= mRunOptions.PickUpPath

..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= mRunOptions.SMTPConnectTimeout
.Configuration.Fields.Update

.Subject = "eMail Report
.From = "(e-mail address removed)"
.To = pLastAddr
.AddAttachment (App.Path & "\our_logo.gif")
.AddAttachment "Test.PDF"
.HTMLBody = pHTMLHeader & pHTMLBody & pHTMLFooter
.Send
End With
 
J

Jeff Cochran

We're having some trouble with some PDF files sent to our customers,
they aren't able to be read because they are "damaged, and cannot be
repaired". Looking into this, I think it has to do with the encoding
we are using. We don't specify a type and I think it's defaulting to a
7-bit encoding, when I think we need 8.

First of all, does that sound right? If so, does anyone have an
example of how to specify the right encoding for PDF files? The
messages are in HTML format, with PDF files attached. We're using VB6
and CDO.

We have no issues sending PDF attachments using CDO. Though we don't
use HTML format, I doubt that's the issue. As for the code, ours is
virtually identical with the exception of not using a pickup and not
setting any connection timeout, plus the non-HTML.

Are you possibly sending Acrobat 6/7 formats? We default to Acrobat
3.0 and above for most, 5.0 and above for the rest.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top