Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to create a multi Line string

Status
Not open for further replies.

psbsmms

Programmer
Dec 14, 2001
74
I am sending an e-mail from a form with multiple text boxes that I need to show up in the message body of the e-mail as separate lines. I tried sendkeys, against recommendations to do so as a last resort but that didi not work either.
 
You need to build in some carriage returns:

I assume you have

strbody = me.txt1 & me.txt2 or something

try strbody=me.txt1 & vbCrLf & me.txt2

vbCrLf is a constant that represents a Carriage Return Line Feed (is new line!)


Hope that gets you on your way.

B ----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
It worked great thanks. The command vbCrLf is nowhere in the help of access or VBA where did you find it, is there a convient place to find the reference libary of VB commands?
 
I'm not sure where I learnt it, it's one of those things it seems I've always known!

If you press F2 in the code window you get the Object Browser. There are lots of constants in there, have a look in the "VBA.Constants" class.

The object browser is useful for looking up methods and properties of all the objects available.


Have fun!!!

Ben ----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top