P
Paul
1) I want to save a current open email that has an
attachment as a .rtf including the attachment.
If I run the below code from an outlook module it works,
if I run it from a module in Xl or Word the attachment in
the mail is not saved.
Any clue what I'm doing wrong?
Sub SAVEFILE()
Set myolapp = CreateObject("Outlook.Application")
Set myItem = myolapp.ActiveInspector
If Not TypeName(myItem) = "Nothing" Then
Set objItem = myItem.CurrentItem
'strname = objItem.Subject
objItem.SaveAs "C:\test.rtf", olRTF
Else
MsgBox "There is no current active Inspector."
End If
End Sub
2) How can you open a .msg file in outlook saved on HD
e.g. c:\test.msg through vba (preferably outlook vba)?
attachment as a .rtf including the attachment.
If I run the below code from an outlook module it works,
if I run it from a module in Xl or Word the attachment in
the mail is not saved.
Any clue what I'm doing wrong?
Sub SAVEFILE()
Set myolapp = CreateObject("Outlook.Application")
Set myItem = myolapp.ActiveInspector
If Not TypeName(myItem) = "Nothing" Then
Set objItem = myItem.CurrentItem
'strname = objItem.Subject
objItem.SaveAs "C:\test.rtf", olRTF
Else
MsgBox "There is no current active Inspector."
End If
End Sub
2) How can you open a .msg file in outlook saved on HD
e.g. c:\test.msg through vba (preferably outlook vba)?