drive a current instance of Outlook

  • Thread starter Thread starter cyan21
  • Start date Start date
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
 
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.
 
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);
 
Back
Top