Programmatically displaying a Favorite Public Folder

G

Guest

I have been writing a macro:
- Begins with an Input box to prompt the user to type in their office symbol.
- Then, based on that input, build a string for the path to the users'
office public folder,
- Then add their office public folder to their Outlook Public
Folders\Favorites folder.
- Next, configure the proper view for that public folder.
- Then set the Outlook form to be used when the user posts to that folder.

Here is my difficulty:
I want to end the macro with a view of the folder in the current explorer
window and sorted by Subject as described below.
- I can not figure out how to programmatically display this folder from the
users' Public Folders\Favorites folder instead of displaying it from the
actual location. How do I specify to view/display a folder from within the
Favorites folder?
- How do I sort the folder posts in the Explorer window? The Sort Method for
the Items collection only sorts the collection, not the actual items in the
explorer window.

Any help would be appreciated.
 
S

Sue Mosher [MVP-Outlook]

- I can not figure out how to programmatically display this folder from the
users' Public Folders\Favorites folder instead of displaying it from the
actual location. How do I specify to view/display a folder from within the
Favorites folder?

Walk the folder hierarchy (or use the function at http://www.outlookcode.com/d/code/getfolder.htm) to return the folder as a MAPIFolder object from the Favories branch of the hierarchy, then set ActiveExplorer.CurrentFolder to that MAPIFolder.
- How do I sort the folder posts in the Explorer window? The Sort Method for
the Items collection only sorts the collection, not the actual items in the
explorer window.

Modify the View.XML property of the current view. (TIP: Compare the XML for a sorted and an unsorted view to quickly see the element you need to insert.)

--
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