SendObject Method: This is an easy question

Benjamin Bolduc

Registered User.
Local time
Today, 15:12
Joined
Jan 4, 2002
Messages
169
Hi everyone,

I'm trying to automate a bunch of E-Mails and I can't figure out how to add spaces and formatting in the message text.

For example:

DoCmd.SendObject acSendReport, "Dueordersreport", acFormatSNP, Email, , , "PO# " & PO, "Hello," & _
"Please review the following attachment as it contains important information from Old Dutch Mustard Co., INC / Pilgrim Foods." & _
"If you have any problems opening this file, simply download and install Snapshot Viewer from the following link, directly from Microsoft's web site."


This is my SendObject code and when it generates the Email, all the text is one continous line. (Not very professional looking)

Is there any code that can add spaces and tabs? Or maybe can open a default message? I'd also like to add an active link to a web site in the text too. (I Don't know how to do that either) :)

Thanks for the help!
 
Try using the following:

VBA Constants
vbCRLF = Carriage Return & Line Feed
vbTAB = Tab

ASCII Characters
chr(13) & chr(10) = Carriage Return & Line Feed
chr(9) = Tab

For the Hyperlink Try typing the web site address:

http://www.medigrate.com
 

Users who are viewing this thread

Back
Top Bottom