|
-
Jun 16th, 2012, 12:47 PM
#1
Thread Starter
Frenzied Member
HTML Message
I cant seem to get my first line of the message to show:
HTML Code:
MsgGreeting = EmailForm.TextBox2.Value & " " & Recipient '& vbCrLf & vbCrLf
MsgContent = Msg & EmailForm.TextBox3.Text
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = EmailAddr
.Subject = Subj
'.Body = Msg
.BodyFormat = 2 'olFormatHTML
.HTMLBody = "<font face='Arial color=red> " & MsgGreeting & " </font>"
.HTMLBody = MItem.HTMLBody & vbCrLf & "<font face='Arial color=blue> " & MsgContent & " </font><br/>"
.Display
SendKeys ("%{s}")
End With
this si not displayed at all
.HTMLBody = "<font face='Arial color=red> " & MsgGreeting & " </font>"
if I comment out the second line
.HTMLBody = MItem.HTMLBody & vbCrLf & "<font face='Arial color=blue> " & MsgContent & " </font><br/>"
then the first line shows up as text literal
-
Jun 16th, 2012, 10:16 PM
#2
Re: HTML Message
concatenate all the things in a string variable then use it as a htmlbody, like this
Code:
StrHTML = "<font face='Arial color=red> " & MsgGreeting & " </font>"
StrHTML = StrHTML & MItem.HTMLBody & vbCrLf & "<font face='Arial color=blue> " & MsgContent & " </font><br/>"
.HTMLBody = StrHTML
-
Jun 17th, 2012, 12:41 AM
#3
Thread Starter
Frenzied Member
Re: HTML Message
Thanks
Do you need to have the <html> and <Head> tags?
-
Jun 17th, 2012, 04:20 AM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|