Solved

Positioning an email attachment in VBA

Posted on 2004-10-14
4
460 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
[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
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 12309088
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 12315052
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
ID: 12322924
Thanks so much!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 12323670
You're welcome.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Protecting vb6 & .Net code Obfuscation 18 209
RUNRMTCMD from AS/400 13 122
how to loop through and process two columns in excel 8 71
Help with Classic ASP - Parameterizing Query 16 61
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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