Home > Microsoft Access Help > MS Access dilema

MS Access dilema



I'm sending an automated e-mail using the docmd, my problem is that the message i want to send spans the VBA design page and wraps onto the next page thus turning red and unusable, do's anybody know what i'm doing wrong and if so tell me so that i may sleep again.



Also i would like to attach 2 documents to the e-mail but can only figure out how to send 1, any help on this would also be appreciated.



Please make your responces easy to read as i'm a new user



Thanks

    
Guest


On the message spanning two pages you can continue a message using the ampersand and the underscore like this:




Code:



Dim strMess As String
strMess = "This is my first line of my text and " & _
"now I am going to continue a second line " & _
"however the message will appear as a " & _
"complete paragrapgh with out any built in " & _
"carraige returns. The text will wrap depending " & _
"on the size of the email window."






Depending on what you are doing you may want to consider storing your messages in the table and calling them as you need them.



By the way the above code could be used in a SendObject like this:




Code:



Dim strMess As String
strMess = "This is my first line of my text and " & _
"now I am going to continue a second line " & _
"however the message will appear as a " & _
"complete paragrapgh with out any built in " & _
"carriage returns. The text will wrap depending " & _
"on the size of the email window."

DoCmd.SendObject , , , "email@nowhere.com", , , "Subject Line", _
strMess, True






As far as adding a second attachment how are you doing the first?

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved