HTMLBody in VBA

SoxPats83

Registered User.
Local time
Today, 12:50
Joined
May 7, 2010
Messages
196
i am about ready to give up on a project i am attempting to complete. i have a form that is going to be used for generating email and within this form is a subform. the subform is viewed as a continuous form. what i would like is to take the contents of this subform and send them as the body of the email. i am able to send it as an attachment in HTML format, but what i would really like is within the body of the email formatted as HTML.
Code:
.HTMLBody = Form![sub]
all my other codes are functioning and this is where the debugger keeps on bringing me. basically what i want it to do is to acknowledge the subform within my current form and to add that as the body of the email that my main form is generating.
 
Sorry, you can't do it that way. You would need to actually provide the content AND the HTML formatting for it to recognize it.
 
Sorry, you can't do it that way. You would need to actually provide the content AND the HTML formatting for it to recognize it.
do you know of anyway to possibly accomplish what it is i am trying to do?
 
how about if all the contents of my subform where within my main form and then for the "HTMLBody =" i would have multiple Me! or Me. in one line. i tried that before. for example:
Code:
Me.text1 & Me.text2 & Me.text3 & Me.text4
and this would kick back errors as well.

for the record my current subform is nothing but a bunch of text boxes.
 
You need to create an HTML document essentially:
Code:
.HTMLBody = "<HTML><HEAD><Title>My Document</Title></HEAD><Body>" & Me.Text1 & "<br>" & Me.Text2 & "<br>" & Me.Text3 & "<br></Body></HTML>"
 
thank you boblarson once again! also, do you by any chance know the coding so that whomever is using this form, their default OutLook signature will be apart of the email?
 
do you by any chance know the coding so that whomever is using this form, their default OutLook signature will be apart of the email?
Sorry, that part I have never gotten. Hopefully you can get help for that one from someone who has.
 

Users who are viewing this thread

Back
Top Bottom