Solved

Positioning an email attachment in VBA

Posted on 2004-10-14
4
437 Views
Last Modified: 2008-02-01
I am adding an attachment to an outlook email via VBA and want to manipulate the position of the attachment within the email because it is ending up in the middle of the email body.  I understand that there is a position argument within attachment.add that may help me, but I can't find what the possible values of this property are.

 
0
Comment
Question by:msanzenb
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
Comment Utility
The position parameter only applies to RTF formatted messages and specifies the character position within the message that the attachment is to be placed at.  You can pass it -1 to place the attachment at the begining of the message.  If you want to place it at the end then you can use the Len() function to get the length of the message body and use it as the position argument.  
0
 

Author Comment

by:msanzenb
Comment Utility
Thanks so much!
0
 
LVL 76

Expert Comment

by:David Lee
Comment Utility
You're welcome.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now