Macro with multiple Lines of text for email OL 2007

  • Thread starter Thread starter Winnipeg Michael
  • Start date Start date
W

Winnipeg Michael

I'd like to create a macro, that will email a person, and the in the body of
the email, there are multiple lines of text.
I can get the email address set up, and one line of text. How can I add 2
or 3 more lines in the macro?

Thanks,
Michael
 
i think that maybe you are looking for the linefeed constant.
try using
mymail.body = "some text" & vbCrLf & "some more text" & vbCrLf & "yet more
text."

this will add a carriage return to the text being put in the body.

Preston
 
Brilliant!!! Thanks, Preston.

It looks so good, I have to ask this.
Is there a way to have the cursor to be at the start of the 4th line of text?

Thanks,
Michael
 
If you have something that you want to append to the body then you might try
always making the last character in the body be vbCrLf. Then when you append
things to the body you can use the logic
mymail.body = mymail.body & "new text to add at the end"

alternatively you could just make sure and add vbCrLf to the beginning of
new text to be added.
hopefully this works for you

Preston
 
You mean to try this:

mymail.body = "some text" & vbCrLf & "some more text" & vbCrLf & "yet more
text" & vbCrLf
 
Back
Top