Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-mail function

Status
Not open for further replies.

jamie13

MIS
Jan 15, 2002
43
CA
Hi,
I'm currently using the e-mail function to send out invoices to customers. I was typing the message i want in the e-mail, but i don't know how to continue my message to the next line in the code. I can type the message on one long line but when i get to the end I am stuck.
Also how can you skip lines in the actucal e-mail?

Thanks
Jamie
 
I think you are talking about first of all the line continuation process in ACCESS VBA code:

The Underscore _ continues the VBA code to the next line:

Example:
vEmailText = "This is the message that I want to send " & _
"to all persons receiving this email."

You can cancatenate the following into your email text message string to create a carriage return to the next line or create a blank line:
vbCrLf or Chr(13)

Carriage Return Example:
vEmailText = "This is the message that I " & vbCrLf & "to send to all persons receiving " & chr(13) & "this email."


Blank Line Example:
vEmailText = "This is the email Message: " & vbCRLf & vbCRLf & "Notice to all emmployees. You paycheck will be delayed for the next two weeks."

I hope this is what you were looking for.

Bob Scriver
 
I find it easier to use a memo field from a table to insert the message (If it's always the same message just create a table with one record). I have a similar application and the user responsibile for the message changes it occationally. I have her type it into a Word document, then I copy and paste the formatted text into the memo field and use that field as the message within my code. The line breaks carry over into the email just fine.
 
Hi Bob,

You had helped me greatly back in May regarding an elaborate script you wrote to parse first/last names and addresses in Microsoft Access (which split the text into various fields). I sure do appreciate your handy-work and I use it every day -- it's great! :)

I have been trying (in a rather futile manner) to program a script that will automatically send email to people through a form in Microsoft access (through Outlook 2002). These emails would be as simple as saying:

EMAIL SUBJECT: Thanks for your order on [OrderDate]

Hi [CustomerFirstName],

Thanks for your order of:
[SeriesName] (multiple items listed)

Thanks,
Jon

I really appreciate your previous thorough programming and was wondering if you'd be willing to help me get started with writing a script for this purpose. I understand a need a dlookup function to get the [CustomerFirstName] from the form, but I'm not quite sure how to go about this to get started.

Thanks in advance for any assistance!
Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top