Trying to Paste Into Vba Say Too Many Line Continuations

INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!

  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

.body ""Too Many Lines Continuation" Error"

.body ""Too Many Lines Continuation" Error"

(OP)

Hello -

i'm working access 2007 and creating an email with 4 attachement but i am getting an error message "Too Many Lines Continuation"  the body of the email is pretty long and there are a few breaks in there... is there away i can get around this?

CODE

.Body = "Dear " & vName & "," & vbCrLf & vbCrLf & _
                "This message is to inform you that you have been found eligible to receive a <System Insert>." & _
vbCrLf & vbCrLf & _

.......... more vbCrLf & vbCrLf & _


RE: .body ""Too Many Lines Continuation" Error"

CODE

.Body = "Dear " & vName & "," & vbCrLf & vbCrLf
.Body = .Body & "This message is to inform you that you have been found eligible to receive a <System Insert>."
.Body = .Body & vbCrLf & vbCrLf

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: .body ""Too Many Lines Continuation" Error"

Stop to get breathe after a few _s (I think the limit is 24 before you get the error) and go on.

.Body = "Dear " & vName & "," & vbCrLf & vbCrLf & _
                "This message is to inform you that you have been found eligible to receive a <System Insert>." & _
vbCrLf & vbCrLf

.Body = .Body & "blah de blah" & _
        ....

RE: .body ""Too Many Lines Continuation" Error"

Or ask in an Access forum.

One answer in actual VB would be to create a template custom resource with the bulk of the text and inline place holders like $1$ through $n$ and use Replace$() on the retrieved resource to insert variable values.

RE: .body ""Too Many Lines Continuation" Error"

(OP)

thanks ALL! i did not know that there was a limit to breaks... but now that i know.. i think i might need to stay away from it...

RE: .body ""Too Many Lines Continuation" Error"

When dealing with strings, there is a performance benefit to the line continuation.  So... don't avoid it completely.  In fact, don't avoid it at all unless you get the "too many line continuation" error.

Truth is, you're not likely to run in to many situations where the difference in performance is noticeable.  However, I encourage you to not generalize any sort of rules like "like continuation is bad".

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

  • Tek-Tips ForumsTalk To Other Members
  • Notification Of Responses To Questions
  • Favorite Forums One Click Access
  • Keyword Search Of All Posts, And More...

Register now while it's still free!

Already a member? Close this window and log in.

Join Us Close

moralezcomilly.blogspot.com

Source: https://www.tek-tips.com/viewthread.cfm?qid=1666953

0 Response to "Trying to Paste Into Vba Say Too Many Line Continuations"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel