A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Advise more than one interface



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 1st 07, 02:56 PM posted to microsoft.public.outlook,microsoft.public.outlook.program_addins
MON205
external usenet poster
 
Posts: 31
Default Advise more than one interface

Hello all,
In my outlook add-in, I want to catch the event when adding items to some
folders (e.g. Deleted Items in all PSTs).
My solution depend on monitoring the Items collections of these folders.
I inherited my class from IDispEventSimpleImpl to handle the
Outlook::ItemsEvents.
Now, can I use this class (just one) to monitor more than a folder items? I
noticed that if I called the DispEventAdvise more than a time it returns
E_UNEXPECTED. How can I do this knowing that the number of folders I want to
monitor is not fixed.
Ads
  #2  
Old August 1st 07, 05:39 PM posted to microsoft.public.outlook,microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Advise more than one interface

Create a class wrapping the advise sink and whatever else you need to store
on the per-folder level. Create an instance of that class for each folder
that you need to monitor.

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

"MON205" wrote in message
...
Hello all,
In my outlook add-in, I want to catch the event when adding items to some
folders (e.g. Deleted Items in all PSTs).
My solution depend on monitoring the Items collections of these folders.
I inherited my class from IDispEventSimpleImpl to handle the
Outlook::ItemsEvents.
Now, can I use this class (just one) to monitor more than a folder items?
I
noticed that if I called the DispEventAdvise more than a time it returns
E_UNEXPECTED. How can I do this knowing that the number of folders I want
to
monitor is not fixed.



  #3  
Old August 2nd 07, 08:48 AM posted to microsoft.public.outlook,microsoft.public.outlook.program_addins
MON205
external usenet poster
 
Posts: 31
Default Advise more than one interface

Very very nice.... It works just fine now.
Thanks Mr. Dmitry

"Dmitry Streblechenko" wrote:

Create a class wrapping the advise sink and whatever else you need to store
on the per-folder level. Create an instance of that class for each folder
that you need to monitor.

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

"MON205" wrote in message
...
Hello all,
In my outlook add-in, I want to catch the event when adding items to some
folders (e.g. Deleted Items in all PSTs).
My solution depend on monitoring the Items collections of these folders.
I inherited my class from IDispEventSimpleImpl to handle the
Outlook::ItemsEvents.
Now, can I use this class (just one) to monitor more than a folder items?
I
noticed that if I called the DispEventAdvise more than a time it returns
E_UNEXPECTED. How can I do this knowing that the number of folders I want
to
monitor is not fixed.




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Advise more than one interface MON205 Outlook - General Queries 2 August 2nd 07 08:48 AM
Appointments are locked. Won't open. Please advise. JBou Outlook - Calandaring 0 March 28th 07 02:01 AM
Please advise how to log on to email with multiple users...thanks Andrew Props Outlook - Installation 1 August 8th 06 12:54 AM
advise of or prevent duplicate entries in calender qwertykb Outlook - Calandaring 0 May 8th 06 05:26 PM
Received e-mail my question was answered, can't find it. ADVISE theborg99 Outlook - Using Forms 0 March 20th 06 06:09 PM


All times are GMT +1. The time now is 08:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.