Changing Folders

  • Thread starter Thread starter Jonathan Parminter
  • Start date Start date
J

Jonathan Parminter

Hi, I cannot seem to find the command to change the
current/active folder to another (Public) folder. Have you
got an example I can use to programmatically switch from
one folder to another?

I have a userform to provide a userfriendly search form
for a custom contacts folder. A button is provided on the
main menu to show this form. But the user could be in any
folder when they show this form. When they click
the 'display search results' button the results are shown
in the contacts folder. But the user must manually switch
to the public folder contact folder.

I guess an alternative is if you can provide a method to
ensure that the button to show this form is only enabled
when the contacts folder is active.

Any ideas or suggestions appreciated :-)

Cheers
Jonathan
 
I found the answer... mobjFolder.Display

However an error message was displayed unless I hide the
userform before this line and then I can show the userform
after this line.

Hopes this helps someone out there :-)
Cheers
Jonathan
 
Use Explorer.CurrentFolder, e.g.
Application.ActiveExplorer.CurrentFolder =
Application.Session.GetDefaultFolder(olFolderInbox)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Thanks Dmitry, works a treat...

Cheers
Jonathan
-----Original Message-----
Use Explorer.CurrentFolder, e.g.
Application.ActiveExplorer.CurrentFolder =
Application.Session.GetDefaultFolder(olFolderInbox)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool





.
 
Back
Top