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

Why DispEventAdvise couldn't work?



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 10th 09, 03:20 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default Why DispEventAdvise couldn't work?

Q1: In OnConnection function, the follow code can work. I'm using outlook2003.

Outlook::MAPIFolderPtr pSentFd = m_NSPtr-GetDefaultFolder(Outlook::
olFolderSentMail);
pSentFdItems = pSentFd-GetItems();
ItemsItemAddEvent:ispEventAdvise(pSentFdItems);
But following couldn't, why?
m_NSPtr-GetFolders(); then loop to search the specified folder, i'm sure i
found the correct folder, then
if(HotPtr != NULL)//HotPtr is the correct MAPIFolderPtr for olFolderSentMail.
{
CComPtrOutlook::_Items HotInboxItems = HotPtr-GetItems();
long ll = HotInboxItems-GetCount();
ItemsItemAddEvent:ispEventAdvise(HotInboxItems);
}
But the event could not be fired.
Q2: How could i get MailItem of the mail receive from HTTP hotmail? I don't
know how to DispEventAdvise on hotmail's message store(I add a HTTP account
which is MS's hotmail), i use the code above to set event on the folder of
hotmail(and i'm sure the folder is correct folder), but couldn't work. Is
there a way to get hotmail's(INTERSTOR) "Namespace" so that i can get its
folder to set the current advise?
In a word, i want to get the MailItem of HTTP mail from hotmail to process,
is that clear?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200904/1

 




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
Greek Fonts Dont work in Office but work in Windows George Outlook - Using Contacts 0 May 16th 07 10:33 PM
How to set up 3 days at work 3 days off work repeating? Glenn Tricarico Outlook - Calandaring 2 February 12th 07 11:57 PM
How do I customize my work week if I work different hours daily? Pratherer Outlook - Calandaring 1 October 31st 06 05:57 AM
e-mail alerts don't work,setup but don't work- Studmn1 Outlook - General Queries 3 August 24th 06 09:38 PM
Getting no Events ! - IDispEventSimpleImpl , DispEventAdvise davidb Add-ins for Outlook 3 June 13th 06 08:31 AM


All times are GMT +1. The time now is 12:42 PM.


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.