drive a current instance of Outlook

C

cyan21

hello,

Is It possible to drive the current instance of Outlook and to do
actions on it like changing current folder?

I managed to connect to the current Outlook, but I don't know how to
step into another folder without opening a new window.

is someone know how to do it ?

thank in advance.

yann
 
K

Ken Slovak - [MVP - Outlook]

Set Application.ActiveExplorer.CurrentFolder = oFolder

where oFolder is the folder you want as active.

See the Object Browser for help with the Outlook object model and
www.outlookcode.com for Outlook programming information.
 
C

cyan21

thanks a lot ken

I forgot to say I program in C++ but as the name of methods as similar
in VBA and C++, I finally made it.

here is my code in C++ :

CNameSpace olNs(olApp->GetNamespace("MAPI"));
CMAPIFolder rep = olNs.GetDefaultFolder(16); // draft folder

((CExplorer)olApp->ActiveExplorer()).putref_CurrentFolder(rep);
 

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