How to get the root folder of the select store

  • Thread starter Thread starter Peter Marchert
  • Start date Start date
P

Peter Marchert

Hello,

I`m searching for a method to get the root folder from the actual store
(for example "\\Personal Folders") without using an explorer.

Now I use "Outlook.ActiveExplorer.FolderPath" to get the root folder
from this path with an own function. But my function does not work if
there is no ActiveExplorer :-(

How can I do that?

Peter
 
NameSpace.Folders. Iterate that collection, that will give you the top of
each loaded store.

NameSpace.GetDefaultFolder(olFolderInbox).Parent is also the top of store of
the default store. No Explorer needed for that.
 
Hello Ken,

thank you for your answer.

But how can I only get the store which is selected?

For example: There is profile with 3 pst-files:
"Personal Folders1"
"Personal Folders2"
"Personal Folders3"

"Personal Folders1" is the default store. The user has selected the
second store "Personal Folders2". Now I want to know wihch store he has
selected.

Peter
NameSpace.Folders. Iterate that collection, that will give you the top of
each loaded store.

NameSpace.GetDefaultFolder(olFolderInbox).Parent is also the top of store of
the default store. No Explorer needed for that.




Peter Marchert said:
Hello,

I`m searching for a method to get the root folder from the actual store
(for example "\\Personal Folders") without using an explorer.

Now I use "Outlook.ActiveExplorer.FolderPath" to get the root folder
from this path with an own function. But my function does not work if
there is no ActiveExplorer :-(

How can I do that?

Peter

--
Peter Marchert
[EDV-Service Marchert]
Homepage: http://www.marchert.de
Excel- und Outlookprogrammierung
 
The user can't select a store unless there's a UI. If there's a UI there's
an Explorer.

Default store I told you how to get.
 
Ken said:
The user can't select a store unless there's a UI. If there's a UI there's
an Explorer.

Not all the time. In some cases there is a problem with a folder and if
so there is no explorer. In this case there is shown a message like
"This folder cannot be shown" (translated from German) on a grey
background.

This case I would handle by my error handler.

Is this possible?

Peter
 
There's still at least one Explorer, even if it's not showing a folder in a
specific store. Otherwise the user couldn't select a thing.

In the case you mention I don't know of a way to get what folder was
selected that caused the error.
 
Ok, thank you Ken.

Peter
There's still at least one Explorer, even if it's not showing a folder in a
specific store. Otherwise the user couldn't select a thing.

In the case you mention I don't know of a way to get what folder was
selected that caused the error.
 
Back
Top