A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Enumarating pst files Outlook opens



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 5th 08, 11:53 PM posted to microsoft.public.outlook.program_vba
Jalil
external usenet poster
 
Posts: 2
Default Enumarating pst files Outlook opens

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
Ads
  #2  
Old June 6th 08, 01:23 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Enumarating pst files Outlook opens

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
-
"Jalil" wrote in message
...
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



  #3  
Old June 6th 08, 04:48 PM posted to microsoft.public.outlook.program_vba
Jalil
external usenet poster
 
Posts: 2
Default Enumarating pst files Outlook opens

Dimitry,

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

-Jalil

"Dmitry Streblechenko" wrote:

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
-
"Jalil" wrote in message
...
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




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
outlook now opens twice Mark Corbelli Outlook - General Queries 1 May 6th 08 03:04 PM
Outlook only opens in safemode Mark A. Sam Outlook - General Queries 6 November 5th 07 02:58 AM
Outlook Opens to calendar RWL Outlook - Installation 1 August 25th 06 07:25 PM
Outlook Opens On Its Own Jan Groshan Outlook - General Queries 2 July 13th 06 07:48 PM
My outlook opens two times JimMidlothian Outlook - General Queries 0 March 10th 06 04:40 PM


All times are GMT +1. The time now is 05:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.