accessing an item from a public folder

G

Guest

How do I read a postitem stored ni a public folder through Outlook Object
Model.
I have a C# COM Add-In that reads this item and update's its cache.

trying to do
NameSpace.getDefaukltFolder.GetDefaultFolder(OlDefaultFolders.olPublicFoldersAllPublicFolders).folders("subfolder").items.getfirst() doesn't work
 
S

Sue Mosher [MVP-Outlook]

Look at the folder list. Do you see your "subfolder" under All Public
Folders? No, the minimum hierarchy would be Public Folders\All Public
Folders\subfolder. You need to walk the *entire* hierarchy down the your
folder using the Folders collection for each level.
 
G

Guest

How do I access the top level container which is "Public Folders"?
I though by using
NameSpace.GetDefaultFolder(OlDefaultFolders.olPublicFoldersAllPublicFolders)
I will get the "All Public Folders" folder under the "Public folders"
container. Is this still correct?
jey


Sue Mosher said:
Look at the folder list. Do you see your "subfolder" under All Public
Folders? No, the minimum hierarchy would be Public Folders\All Public
Folders\subfolder. You need to walk the *entire* hierarchy down the your
folder using the Folders collection for each level.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Where does your subfolder sit in the hierarchy? Is it a top-level folder?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Software Solutions said:
How do I access the top level container which is "Public Folders"?
I though by using
NameSpace.GetDefaultFolder(OlDefaultFolders.olPublicFoldersAllPublicFolders)
I will get the "All Public Folders" folder under the "Public folders"
container. Is this still correct?
jey
 
G

Guest

In my outlook folder view I see public folders -> all public folders -> then
my "sub folder"
--jey
 
S

Sue Mosher [MVP-Outlook]

OK, that sounds right. What does GetDefaultFolder return? (Best practice in
Outlook is to get each object separately.)

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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