Hi
I need to save my emails as rtf files in a particular folder in the hard drive.
I have numerous emails stored in a subfolder of my personal folder in
Outlook. The files are currently in an Outlook msg format. I want to
convert them to RTF and store them.
I am curious if anybody knows of a macro or VBA that will save all emails
in
the folder as RTF and save them to a widows folder for example:
C:\Outlook\Messages
Please advise.
Thanks in advance,
Hi jesika,
By this code you will be able to auto-save the emails directly to your hard disk.Try this.
Code:procedure TAddInModule.adxOutlookAppEvents1NewMail(Sender: TObject); var outlook1: olevariant; mymailitem: olevariant; begin try Outlook1 := GetActiveOleObject('Outlook.Application'); except Outlook1 := CreateOleObject('Outlook.Application'); end; try olsecuritymanager1.DisableoomWarnings := True; except olsecuritymanager1.DisableoomWarnings := False; end; mymailitem:=outlook1.activeexplorer.selection.item(1); mymailitem.SaveAs('c:\mail\'+floattostr(now)+'.msg'); olsecuritymanager1.DisableoomWarnings := False; outlook1:=unassigned; end;
ExlGuru
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks