Save mail on harddrive

  • Thread starter Thread starter Solander
  • Start date Start date
S

Solander

I wish to create a macro that will save the currently opened mail to a
specified folder on the harddrive.

The plan is to create a custom toolbar-button that will execute the code
saving the mail.

How do I do this ?

Regards,
Solander
 
Sub SaveOpenItem()
Dim oMail As Outlook.MailItem

Set oMail = Application.ActiveInspector.CurrentItem
oMail.SaveAs path, type
Set oMail = Nothing
End Sub

You will need to code or get the path as a string and you need to set
the type. See the Help in the Object Browser for MailItem.SaveAs to
see what types are supported.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
Back
Top