folder protection properties

D

DavidH&P

HI,

I'm using Outlook2007 beta2 and VSTOv3.
Like on this example : http://msdn2.microsoft.com/en-us/library/ms268879.aspx
I have programmaticaly created a new folder in Outlook but I would like to
protect this folder. I don't want the user to delete it. I see that the inbox
folder is protected, How can I do that on my folder ? Is there a property for
that ?

Thanks,

David
 
K

Ken Slovak - [MVP - Outlook]

Only intrinsic folders such as Inbox can't be deleted and you can't set that
property from code.
 
D

DavidH&P

thanks for your answer,

How can I know that a folder is an intrinsic one (programmaticaly) ?
and can I change the folder's icon by a personal icon ?

thanks,

David
 
K

Ken Slovak - [MVP - Outlook]

You cannot change the folder icon.

You can get all the intrinsic folders using GetDefaultFolder and store the
EntryID's in a table and compare any folder to that to see if there are any
matches. Using the Outlook object model you'd always get the long-term
EntryID.

Using a lower level API you can read the Inbox folder and get the ID's of
default folders from properties such as PR_IPM_APPOINTMENT_ENTRYID
(Calendar), PR_IPM_CONTACT_ENTRYID (Contacts), PR_IPM_DRAFTS_ENTRYID
(Drafts), etc.
 
D

DavidH&P

Thanks for you help,
I will do like that...

Ken Slovak - said:
You cannot change the folder icon.

You can get all the intrinsic folders using GetDefaultFolder and store the
EntryID's in a table and compare any folder to that to see if there are any
matches. Using the Outlook object model you'd always get the long-term
EntryID.

Using a lower level API you can read the Inbox folder and get the ID's of
default folders from properties such as PR_IPM_APPOINTMENT_ENTRYID
(Calendar), PR_IPM_CONTACT_ENTRYID (Contacts), PR_IPM_DRAFTS_ENTRYID
(Drafts), etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top