Solved

Email Attachments

Posted on 2009-07-09
1
202 Views
Last Modified: 2013-11-30
I am creating an email using RFC-822 Email Standards that I place in a pickup directory for Outlook to process.  Everything works fine except that I now want to send pdf attachments as part of the email that I create and do not know what to specify.

I create a plain text/html email by specifying the following:
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

What additional code do I need to write to send pdf attachments to the email that I'm creating and sending to the pickup directory for Outlook.
0
Comment
Question by:BISCO3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 20

Accepted Solution

by:
darbid73 earned 500 total points
ID: 24815280
You are going to have an object called "msgOutlook" which will be your email object.  From this object as you can see below you will be able to give your email all the properties that you want including subject and email address etc.

You will then be able to save this emil, or move it to your folder.

To add the attachment you will need the path which is the most important.  

For me I wanted to add the attachment in the email body so I used a position like this

AttachmentPosition = Len("your body text") - 6

But you really need to play around with this cause I was never really happy with it.

to understand all the properties of the Attachment see this http://msdn.microsoft.com/en-au/library/aa210902(office.11).aspx

With msgOutlook
    If Len(AttachmentPath) > 0 Then
    .Save
    .Attachments.Add AttachmentPath, olByValue, AttachmentPosition, AttachmentName
    End If
    .BodyFormat = olFormatRichText
    .Subject = "your subject text"
    .To = strTo
    .body = "your body text"
    .display
End With

Open in new window

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question