How to get current folder

A

Ashish

Hi,

I am creating an addin for outlook. I handle the case when create a new
folder. For this i sink event for FoldersEvents.
My question is when i create a new folder how to get that folder name?
I tried to use Application->ActiveExplorer->CurrentFolder
but it gived different folder.
Please suggest
 
A

Ashish

How to implement FolderEvents in c++.
FolderAdd

FolderChange

FolderRemove



Please give some example
 
D

Dmitry Streblechenko

Search for IConnectionPointContainer etc.
Or use the wrapper classes created by VC++ when you import a type library
using #import.

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

Ashish

Thanks. Well i have one doubt which i want to clear. Is there any property
for a folder which tells the folder is newly created or it's old.
I handle the events for folder. When i create a new folder (suppose i
create a folder subinbox under Inbox folder) then first FolderChange
function call for Inbox, after that FolderAdd function call for subinbox.
How can i know Inbox is already created and subinbox i'm creating now. there
must be some property. I have checked all but could not find. Please
suggest.
 
D

Dmitry Streblechenko

What is "newly created or it's old"? Is it 1 second old? 1 week old?
There is no such property.

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

Ashish

FolderAdd is called when we create a new folder and outlook register this
folder (assign its store id, entry id etc).
Is there any function which call before outlook register this folder? means
when i create a new folder FolderAdd will call for this folder. But at that
time outlook already register this folder(assign storeid,entry id). Is there
any other function which call before outlook assign entryid,storeid to this
folder?
 
D

Dmitry Streblechenko

No, all MAPI events are asynchronous and occur after the action (new folder
creation in your case) had already taken place.

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

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