![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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. |
#3
|
|||
|
|||
![]()
I don't understand what NS means?
"Dmitry Streblechenko" wrote in message ... 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. |
#4
|
|||
|
|||
![]()
Oh, I just realised NS = namespace.
I just want to run a vba routyine from inside outlook 2003 (or excel or word). I don't have visual studio or anything. Max "Maxx" wrote in message ... I don't understand what NS means? "Dmitry Streblechenko" wrote in message ... 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. |
#5
|
|||
|
|||
![]()
In that case, in your VBA macro, replace Dmitry's first two statements with this one:
Set NS = Application.Session -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Maxx" wrote in message ... Oh, I just realised NS = namespace. I just want to run a vba routyine from inside outlook 2003 (or excel or word). I don't have visual studio or anything. Max "Maxx" wrote in message ... I don't understand what NS means? "Dmitry Streblechenko" wrote in message ... 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. |
#6
|
|||
|
|||
![]()
Ah, sorry, replace the line
Set NS = App.Logon with Set NS = \App.GetNamespace("MAPI") NS.Logon Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Maxx" wrote in message ... I don't understand what NS means? "Dmitry Streblechenko" wrote in message ... 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. |
#7
|
|||
|
|||
![]() Hi, What should I do to save the mails in .msg format? *** Sent via Developersdex http://www.developersdex.com *** |
#8
|
|||
|
|||
![]()
Call SaveAs specifying the olMsg rather than olRtf format.
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Sudharsan Chandra" wrote in message ... Hi, What should I do to save the mails in .msg format? *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Computer crash but msgs saved on zip disk.. now what?? | Bonk | Outlook Express | 11 | November 30th 07 05:13 PM |
Why does outlook 2007 create archive2.pst and how do I get it to only use archive.pst | Jim[_3_] | Outlook - General Queries | 2 | September 13th 07 04:18 PM |
Archive Files & Reducing Outlook bloat | Sitara Lal | Outlook - General Queries | 4 | July 3rd 07 02:37 PM |
How to transfer outlook email msgs. from archive to DVD | dcornett | Outlook - General Queries | 4 | May 21st 07 02:38 AM |
Outlook Archive location and PRF files | CTXFRMR | Outlook - Installation | 3 | January 19th 06 12:51 AM |