By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,738 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,738 IT Pros & Developers. It's quick & easy.

Reference Exchange Public Folder in vb.net

P: n/a
I have some vb.net code that goes and gets some information from our
Contacts Public folder named "Pierce Contacts". As you see from the code
below, i reference this folder by first navigating to the folder in outlook.
Is there any way to reference the public folder programatically.
The exchange public folder is under
"Public Folders"
"All Public Folders"
"Pierce Contacts"

Sample code:
ol = New outlook.Application
olns = ol.getnamespace("MAPI")
***-> olFolder = ol.activeexplorer.currentfolder <-****** 'currentfolder'
CurFolder = olFolder.name
AllItems = olFolder.items
NumItems = AllItems.count
For Each Itm In AllItems
'do some stuff here
Next
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
To get a non-default folder, you need to walk the folder hierarchy using the Folders collections, starting with Namespace.Folders, or use a function that does that for you. See http://www.outlookcode.com/d/code/getfolder.htm for a VB example that should give you the basic idea.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Chris Thunell" <ct******@pierceassociates.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
I have some vb.net code that goes and gets some information from our
Contacts Public folder named "Pierce Contacts". As you see from the code
below, i reference this folder by first navigating to the folder in outlook.
Is there any way to reference the public folder programatically.
The exchange public folder is under
"Public Folders"
"All Public Folders"
"Pierce Contacts"

Sample code:
ol = New outlook.Application
olns = ol.getnamespace("MAPI")
***-> olFolder = ol.activeexplorer.currentfolder <-****** 'currentfolder'
CurFolder = olFolder.name
AllItems = olFolder.items
NumItems = AllItems.count


For Each Itm In AllItems
'do some stuff here
Next

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.