RE: CDO and PDF files

From: Alexander (Alexander_at_discussions.microsoft.com)
Date: 02/15/05


Date: Tue, 15 Feb 2005 09:03:01 -0800

Hello Jeff,
You can use the encoding proeprty of the message object:

...
oSMTPMessage.BodyEncoding = System.Text.Encoding.Default;
...

(Sorry I am addicted to C# but in VB it should work in the same way).
Of course you do not habe to use "Default" - you can specify other formats.
But nevertheless I can't tell you the right one for PDF attachments ...

Regards,

  Alexander

"Jeff" wrote:

>
> 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 = "me@yourcompany.com"
> .To = pLastAddr
> .AddAttachment (App.Path & "\our_logo.gif")
> .AddAttachment "Test.PDF"
> .HTMLBody = pHTMLHeader & pHTMLBody & pHTMLFooter
> .Send
> End With
>
>



Relevant Pages

  • CDO and PDF files
    ... We're having some trouble with some PDF files sent to our customers, ... I think it has to do with the encoding ... example of how to specify the right encoding for PDF files? ...
    (microsoft.public.win32.programmer.messaging)
  • CDO and PDF Files
    ... We're having some trouble with some PDF files sent to our customers, ... I think it has to do with the encoding ... example of how to specify the right encoding for PDF files? ...
    (microsoft.public.inetserver.asp.general)
  • CDO and PDF Files
    ... We're having some trouble with some PDF files sent to our customers, ... I think it has to do with the encoding ... example of how to specify the right encoding for PDF files? ...
    (microsoft.public.inetserver.iis.smtp_nntp)
  • Re: Data source not "sticking"
    ... First, as far as I am aware, when the data source is a text file and you ... have to specify the encoding, Word does not store the information about the ... encoding when it saves the mail merge main document. ... XML format (i.e. not the sort of simple XML format doucment you might ...
    (microsoft.public.word.docmanagement)
  • Re: Uniquely identifying Sudoku grids
    ... |> uniquely specify every possible sudoku. ... |So you'd need 22 digits to uniquely specify a sudoku puzzle. ... deck of 52 cards +2 jokers, how many poker hands are ... or some such encoding that can be easily ...
    (rec.puzzles)