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

How to know if can I access a folder ?



 
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old September 1st 06, 07:23 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to know if can I access a folder ?

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Gianluigi Rubino" wrote in message
ups.com...
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


 




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
"Unable to display the folder. Microsoft Outlook could not access the specified folder location." jw Outlook - General Queries 0 July 21st 06 04:41 PM
"Unable to display the folder. Microsoft Outlook could not access the specified folder location." jw Outlook - Calandaring 0 July 21st 06 04:40 PM
"Unable to display the folder. Microsoft Outlook could not access the specified folder location." jw Outlook - Installation 0 July 21st 06 04:40 PM
How do I restore access to my default email folder? Chris Goetz Outlook - Installation 1 April 29th 06 07:53 AM
Can't Access OE File Folder When Importing into Outlook cnysteve Outlook - Installation 2 January 14th 06 08:26 PM


All times are GMT +1. The time now is 06:59 AM.


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.