How to input text at the beginning of the body of a message.

M

Mr. GetRight

Need a little help.
I'm using Outlook 2003, trying to make a macro that inputs a set statment in
the body of a message. I got it to do it but the problem is my statement
needs to be in front of the attachment that is already in the message but it
keep going behind it. Also for some reason it is removing the first letter
from my statment. I copy and pasted the main parts of it below, ...

Option Explicit
Public icn As String
Public myOlApp As New Outlook.Application
Public myEmail As Object
Public myAttachment As Object

Sub FormateEmail()


Set myEmail = myOlApp.ActiveInspector.CurrentItem
Set myAttachment = myEmail.Attachments

myEmail.To = "(e-mail address removed)"
myEmail.Subject = "Subject Line"

myEmail.Body = "output statement 1=" + icn + " Output statement2"

End Sub
 
M

Michael Bauer [MVP - Outlook]

As your example completely overwrites the body of the message, there's no
reason to see how anything else could be there - except it's an rtf
message, in that case you need to set the position of the attachment(s).

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>

Am Fri, 18 Sep 2009 07:20:02 -0700 schrieb Mr. GetRight:
 

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

Top