How to know if can I access a folder ?

  • Thread starter Thread starter Gianluigi Rubino
  • Start date Start date
G

Gianluigi Rubino

Hi all,
I'm making an outlook addin plugin in vb6.
I want to traverse the folders tree in a shared mailbox.
The problemi is that in some subfolders in this mailbox I don't have
access to them.

I found that I can enumerate the 'forbidden' subfolders in the .Folders
collections, but If I try to acces a proberty of that object I got an
'unkown error in the interface' sorry, but the message is in italian,
so I'm not sure if it's correctly translated it.

So I need to come up with a way if I can access the properties of that
MapiFolder object, i.e. I'd like to get some code like this:

If IsAuthorized(F) then
DoMyJobWithF
end if

Only way to get around this problem I could think of is some pseudocode
like this:
for ..... do
On Error goto SkipFolder
set F = Curr.Folders(i)
Name = F.Name
Whatever = f.whatever
SkipFolder:
Next

There are any (better) alternative to solve this problem ?
Thanky you very much
 
That's probably the best way. You can read the folder permissions but if you
don't have permissions on the folder attempting to read the permissions will
fire an error, so you're back to where you were before.
 
Back
Top