Show New Mail Desktop Alert indicates "HTML <end>"

G

Guest

When I send an Email via vbScript formatted as HTML, the Outlook New Mail
Desktop Alert indicates "HTML <end>" rather than the body of the Email.

How can I get the Alert to indicate the body of the Email.

Thanks in advance,

Tim

Option Explicit

Dim sFrom, sTo, sSubject, sBody
sFrom = "(e-mail address removed)"
sTo="(e-mail address removed)"
sSubject="Subject"
sBody="This is the Body line 1<br>"
sBody=sBody & vbcrlf & "This is the Body line 2<br>"
sBody=sBody & vbcrlf & "This is the Body line 3<br>"
sBody=sBody & vbcrlf & "This is the Body line 4<br>"
sBody=sBody & vbcrlf & "This is the Body line 5<br>"
sBody=sBody & vbcrlf & "This is the Body line 6<br>"
Mail sFrom, sTo, sSubject, sBody
WScript.Echo "Complete"

Function Mail(sFrom, sTo, sSubject, sBody)
Dim oCon, oMsg
Set oMsg = CreateObject("CDO.Message")
Set oCon = CreateObject ("CDO.Configuration")
With oCon
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mailhost.pge.com"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25 'SMTP port
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'CDO Port

..Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 'Timeout
.Fields.Update
'Update the CDOSYS Configuration
End With
Set oMsg.Configuration = oCon
With oMsg
.From = sFrom
.To = sTo
.Cc = ""
.Subject = sSubject
.TextBody="HTML" 'E-mail body format (HTMLBody=HTML TextBody=Plain)
.HTMLBody = sBody
.Send
'Send the e-mail
End With
Set oMsg = Nothing
'Close the server mail object
Set oCon = Nothing
End Function
 
S

Sue Mosher [MVP-Outlook]

Put the text you want to display into TextBody, which is what the desktop alert shows.
 
G

Guest

Thanks that fixed that problem.
I have also noticed that some Emails have a ToolTip type indication when
the mouse is hovered above them in Outlook.
How do I set that?
 
S

Sue Mosher [MVP-Outlook]

There's nothing to set. Outlook pulls data from the item's properties, based on the arrangement of the current view.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Tim said:
Thanks that fixed that problem.
I have also noticed that some Emails have a ToolTip type indication when
the mouse is hovered above them in Outlook.
How do I set that?
 
G

Guest

Thanks
--
Tim Shaffer


Sue Mosher said:
There's nothing to set. Outlook pulls data from the item's properties, based on the arrangement of the current view.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top