J
Jeff Rush
Hi All,
I am having problems with the following code I believe because I am not
encapsulting the Path String in Quotes. However I am not sure how to do it
in VBA...
Any Help would be greatly appreciated..
Thx,
Jeff
====================================================
Sub ChngForamt()
Dim olMsg As Object
Dim SavePath As String
SavePath = "C:\MyTestFolder\"
'Set variable to the (collection of) selected items in Inbox.
Set myolsel = Application.ActiveExplorer.Selection
For Each olMsg In myolsel
SavePath = SavePath & (RTrim(LTrim(olMsg.Subject))) & "RTF"
MsgBox ("SavePath = " & SavePath)
Select Case (olMsg.BodyFormat)
Case olFormatHTML:
olMsg.BodyFormat = olFormatRichText
olMsg.SaveAs
Case olFormatPlain:
olMsg.BodyFormat = olFormatRichText
olMsg.SaveAs SavePath, olRTF
Case olFormatUnspecified:
olMsg.BodyFormat = olFormatRichText
olMsg.SaveAs SavePath, olRTF
Case olFormatRichText
olMsg.SaveAs SavePath
End Select
SavePath = "C:\MyTestFolder\"
Next
End Sub
I am having problems with the following code I believe because I am not
encapsulting the Path String in Quotes. However I am not sure how to do it
in VBA...
Any Help would be greatly appreciated..
Thx,
Jeff
====================================================
Sub ChngForamt()
Dim olMsg As Object
Dim SavePath As String
SavePath = "C:\MyTestFolder\"
'Set variable to the (collection of) selected items in Inbox.
Set myolsel = Application.ActiveExplorer.Selection
For Each olMsg In myolsel
SavePath = SavePath & (RTrim(LTrim(olMsg.Subject))) & "RTF"
MsgBox ("SavePath = " & SavePath)
Select Case (olMsg.BodyFormat)
Case olFormatHTML:
olMsg.BodyFormat = olFormatRichText
olMsg.SaveAs
Case olFormatPlain:
olMsg.BodyFormat = olFormatRichText
olMsg.SaveAs SavePath, olRTF
Case olFormatUnspecified:
olMsg.BodyFormat = olFormatRichText
olMsg.SaveAs SavePath, olRTF
Case olFormatRichText
olMsg.SaveAs SavePath
End Select
SavePath = "C:\MyTestFolder\"
Next
End Sub