Enumarating pst files Outlook opens

  • Thread starter Thread starter Jalil
  • Start date Start date
J

Jalil

How can I get the list of all pst files my Oulook 2003 is configured to open.
I am using Visual Basic 6.

Thanks,

-Jalil
 
In Outlok 2007, you can use Namespace.Stores collection and Store.FilePath /
ExchangeStoreType (=3).
In the older versions of Outlook, MAPI or <plug> Redemption is the way to
go:

skPstAnsi = 1
skPstUnicode = 2
skPrimaryExchangeMailbox = 3
skDelegateExchangeMailbox = 4
skPublicFolders = 5
set Session = CreateObject("Redemption.RDOSession")
Session.Logon
for each Store in Session.Stores
'for i = 1 to Session.Stores.Count
'set Store = Session.Stores(i)
if (Store.StoreKind = skPstAnsi) or (Store.StoreKind = skPstUnicode) Then
Debug.Print Store.PstPath
ElseIf (Store.StoreKind = skPrimaryExchangeMailbox) or (Store.StoreKind =
skDelegateExchangeMailbox) or (Store.StoreKind = skPublicFolders) Then
Debug.Print Store.ServerDN
End If
next

Or you can use ProfMan to direcly read the profile data without havign to
log in: http://www.dimastr.com/redemption/profiles.htm#example2

<plug>

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

Thank you very much. I ran this code and it is exactly what I wanted to do.

-Jalil
 
Back
Top