|
-
May 14th, 2006, 02:40 PM
#1
Outlook XP and Rich Text
I'm trying to create an email with the Body in rich text format. The following code works great for Office 97 and 2K but on XP machines the rtf tags show up in the Body of the email. I'm not sure what the purpose of BodyFormat is since it doesn't appear to recognize the tags. Any help would be appreciated.
On Error Resume Next
Dim objOutlook As Object
Dim objOutlookMsg As Object
Err.Clear
Set objOutlook = CreateObject("Outlook.Application")
If Err.Number <> 0 Then
MsgBox "An Error was encountered trying to open Outlook
Application."
Screen.MousePointer = vbDefault
Exit Sub
End If
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.BodyFormat = olFormatRichText
.To = rsStudents("email")
.cc = ""
.Subject = MySubject
.Body = RichTextBox1.TextRTF
.Display
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
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
|