View Single Post
  #1  
Old September 1st 06, 05:35 PM posted to microsoft.public.outlook.program_vba
Gianluigi Rubino
external usenet poster
 
Posts: 1
Default How to know if can I access a folder ?

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

Ads