C
chuck rudolph
I am trying to write a macro in outlook to print just the body of the
message. My macro looks like:
Set oWordApp = CreateObject("Word.Application")
If oWordApp Is Nothing Then
MsgBox "Couldn't start Word."
Else
Dim oWordDoc
Dim bolPrintBackground
Dim x, y As String
'I have to believe its one of these...
x = Outlook.ActiveInspector.CurrentItem.Body
y = Outlook.ActiveInspector.CurrentItem.HTMLBody
'Create the new work doc
Set oDoc = oWordApp.Documents.Add()
'the next line will work for just the text.
oDoc.Range.Text = x
But what do I use for a body that has some HTML formatting in it?
I tried oDoc.Range.InsertXML(x or y) and got a "can't insert xml data here"
Thanks for the help...Chuck
message. My macro looks like:
Set oWordApp = CreateObject("Word.Application")
If oWordApp Is Nothing Then
MsgBox "Couldn't start Word."
Else
Dim oWordDoc
Dim bolPrintBackground
Dim x, y As String
'I have to believe its one of these...
x = Outlook.ActiveInspector.CurrentItem.Body
y = Outlook.ActiveInspector.CurrentItem.HTMLBody
'Create the new work doc
Set oDoc = oWordApp.Documents.Add()
'the next line will work for just the text.
oDoc.Range.Text = x
But what do I use for a body that has some HTML formatting in it?
I tried oDoc.Range.InsertXML(x or y) and got a "can't insert xml data here"
Thanks for the help...Chuck