text wrapping in coding lines

G

gab1972

I prompting the start of an email through VBA and I have a few canned
paragraphs to write in the body of the email. I'm typing all of this
in the coding lines in VBA and I don't want the lines to go
waaaaaaaaayyyy to the right in my coding lines. How do I wrap the
text to the next line and continue typing so it is all one line?

olMyEmail.Body = "Attached is a permit application package
including_
instrutions and copies of the Design
Exception form_
(if needed) and the permit
application forms."

This does not work...any suggestions?
 
G

gab1972

I prompting the start of an email through VBA and I have a few canned
paragraphs to write in the body of the email.  I'm typing all of this
in the coding lines in VBA and I don't want the lines to go
waaaaaaaaayyyy to the right in my coding lines.  How do I wrap the
text to the next line and continue typing so it is all one line?

    olMyEmail.Body = "Attached is a permit application package
including_
                                 instrutions and copies of the Design
Exception form_
                                 (if needed) and the permit
application forms."

This does not work...any suggestions?

Nevermind....once again...I figured out my own answer. I really need
to start thinking just a bit more before I post. Sorry for the
clutter.

"Attached is a permit application package " & _
"including instructions and copies of the " & _
etc., etc.
 
R

Rick Rothstein

You must break your long lines into separate sub-strings and then
concatenate them. For example, this line ...

L = "Pretend this is a very long line of code that you want to break apart"

becomes this...

L = "Pretend this is a very long " & _
"line of code that you want to " & _
"break apart"

And don't forget to keep the blank space at any "break points" attached to
one of the substrings that you have formed.
 

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