DoCmd.Sendobject (1 Viewer)

m17347047711116

Registered User.
Local time
Today, 21:27
Joined
Feb 4, 2002
Messages
68
I am using the DoCmD.Sendobject to e-mail the contents of a form, the problem i am having is that in the body of the e-mail i would like to seperate paragraphs but i do not know how indicate a line return in the code.

Thank you in advace
 

BukHix

Registered User.
Local time
Today, 16:27
Joined
Feb 21, 2002
Messages
379
Here is an example of what you are wanting to do. It formats the message part of the email like this: (& vbCrLf & is how you do a line break)

___________________________________________
Date: 2/2/2001 12:29:19 PM
Contact: Dirk Gently
Employee Name: Author Dent

Conversation: This is sample text from my control.
___________________________________________

DoCmd.SendObject , , , , , , "Employee/Office Conversation Log", _
"Date: " & Me.Date & vbCrLf & "Contact: " & Me.OfficeEmployee & vbCrLf & _
"Employee Name: " & Me.EmployeeName & vbCrLf & vbCrLf & "Conversation: " & Me.Conversation, False


The Me.Conversation may be the only part of this that you are interested in because it takes what ever is in my conversation text box and puts it in the email. The rest of it puts it in an easy to read format.

'Here is a quick and dirty break down of what is going on in the code

'DoCmd.SendObject , , , , , , "Employee/Office Conversation Log", _
'The first line revs up the SendObject and sets the Subject line.

'"Date: " & Me.Date & vbCrLf & "Contact: " & Me.OfficeEmployee & vbCrLf & _
'The second line starts the message body with Date: and then gets the real date
'from the form with the Me.Date. The vbCrLf forces a carraige return (newline)
'and the newline starts with Contact: etc....


'"Employee Name: " & Me.EmployeeName & vbCrLf & vbCrLf & "Conversation: " & Me.Conversation, False
'This is just a continuation of the previous line.

'Post back if you have more questions.

[This message has been edited by BukHix (edited 02-13-2002).]
 

Users who are viewing this thread

Top Bottom