View Single Post
  #2  
Old December 5th 07, 06:55 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How can I create an archive od outlook msgs saved as rtf files (outside of outlook)

Set App = CreateObject("Outlook.Application")
Set NS = App.Logon
set Inbox = NS.GetDefaulFolder(6) 'olFolderInbox
for each Msg in Inbox.Items
FileNname = "C:\Messages\" & Msg.Subject
'todo: make sure there are no invalid characters in FileName, such as ":",
"*", etc
Msg.SaveAs FileName, 1 'olRtf
next

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Maxx" wrote in message
...
How can I create an archive that contains each outlook mshg from the inbox
saved as an rtf file in a folder such as "C:\Messages"?

I'm using Outlook 2003.







Ads