A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Macro with multiple Lines of text for email OL 2007



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 13th 08, 04:00 PM posted to microsoft.public.outlook.program_vba
Winnipeg Michael
external usenet poster
 
Posts: 9
Default Macro with multiple Lines of text for email OL 2007

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
Ads
  #2  
Old November 13th 08, 04:23 PM posted to microsoft.public.outlook.program_vba
Preston
external usenet poster
 
Posts: 6
Default Macro with multiple Lines of text for email OL 2007

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

"Winnipeg Michael" wrote:

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

  #3  
Old November 13th 08, 04:33 PM posted to microsoft.public.outlook.program_vba
Winnipeg Michael
external usenet poster
 
Posts: 9
Default Macro with multiple Lines of text for email OL 2007

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

"Preston" wrote:

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

"Winnipeg Michael" wrote:

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

  #4  
Old November 13th 08, 04:59 PM posted to microsoft.public.outlook.program_vba
Preston
external usenet poster
 
Posts: 6
Default Macro with multiple Lines of text for email OL 2007

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


"Winnipeg Michael" wrote:

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

"Preston" wrote:

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

"Winnipeg Michael" wrote:

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

  #5  
Old November 13th 08, 05:16 PM posted to microsoft.public.outlook.program_vba
Winnipeg Michael
external usenet poster
 
Posts: 9
Default Macro with multiple Lines of text for email OL 2007

You mean to try this:

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



"Preston" wrote:

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


"Winnipeg Michael" wrote:

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

"Preston" wrote:

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

"Winnipeg Michael" wrote:

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I insert text file's text into my email in outlook 2007 Henry Fung Outlook - General Queries 9 July 14th 08 03:05 AM
Word 97 Macro to Create Outlook '03 Email With Text Format John Ciccone Outlook and VBA 1 May 5th 08 09:42 PM
unwanted porno text lines at the bottom of email gingaboy Outlook - Installation 2 March 2nd 07 02:41 PM
paste text from email causing large spacing between lines lovinglifemn Outlook - Using Contacts 0 October 3rd 06 08:51 PM
Save email as text file macro Simon Outlook and VBA 7 August 10th 06 04:10 PM


All times are GMT +1. The time now is 01:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.