Inserting a carriage return

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using SendObject I have in the correct syntax:

,"this is my text in the message body",True

I want to insert a carriage return and have tried:

,"this is my text"& vbCrLf &"the message body", True

Which does not work. Can anyone correct me OR is it not possible to do this
in this case?

Thank you
 
It certainly ought to work and looks ok - for debugging put it in a variable
and use debug.print:

dim b as string

b = "first Line"
b = b & vbCrLf & "SecondLine"
debug.print b

You should see in the immediate window:

Fist Line
Second Line

Once you get the variable to look as you wish for the message body, use the
variable in your docmd line.
 
Thank you Susan, putting the string together and declaring as a variable
worked. I don't understand why it did not work as a straight string but
be-it-as-it-may, the problem is resolved and I have the solution for the next
time I need it. I appreciate your help so quickly.
 
The solution was putting it a variable I guess, just as you suggested. I
appreciate your help. Don't know why the straight string didn't work but,
thank you.
 
Glad to help any time!

;-)

SusanV

Jeff C said:
Thank you Susan, putting the string together and declaring as a variable
worked. I don't understand why it did not work as a straight string but
be-it-as-it-may, the problem is resolved and I have the solution for the
next
time I need it. I appreciate your help so quickly.
 

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

Back
Top