Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: How to get reminder Event form outlook using VC++

Geek News

How to get reminder Event form outlook using VC++
amit.deshpande4u[ at ]gmail.com 6/13/2006 6:22:23 AM
hi

I am trying to access outlook using VC ++, i have succeeded in adding
reminder and getting contact list but i was unable to get reminder from
outlook.The class ApplicationEvents does this this functionalty and
also has method as
ApplicationEvents :: Reminder(IDispatch *LDDISPATCH) but was unable to
get reminder using this.

so please reply me

Re: How to get reminder Event form outlook using VC++
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 6/13/2006 4:54:38 PM
So what is your existing code and what exactly fails?

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

<amit.deshpande4u[ at ]gmail.com> wrote in message
news:1150179743.499092.34330[ at ]g10g2000cwb.googlegroups.com...
[Quoted Text]
> hi
>
> I am trying to access outlook using VC ++, i have succeeded in adding
> reminder and getting contact list but i was unable to get reminder from
> outlook.The class ApplicationEvents does this this functionalty and
> also has method as
> ApplicationEvents :: Reminder(IDispatch *LDDISPATCH) but was unable to
> get reminder using this.
>
> so please reply me
>


Re: How to get reminder Event form outlook using VC++
amit.deshpande4u[ at ]gmail.com 6/27/2006 7:34:56 AM

here is the code
The code is done for Outlook 2000
{
_ApplicationPtr pApp;
_ItemsPtr pItems;
MAPIFolderPtr pFolder;
_ContactItemPtr pContact;
HRESULT hr,hrAppEvent;
ApplicationEventsPtr pAppEvent;
// access outlook com
OleInitialize (NULL);

hr=pApp.CreateInstance(__uuidof(Application));
if(FAILED(hr))
{
printf("Outlook Initialization failed");

}

_TaskItemPtr pTaskItem= pApp->CreateItem(olTaskItem);
hrAppEvent=pAppEvent.CreateInstance(__uuidof(TaskItem));
if(FAILED(hrAppEvent))
{
printf("Application Initialization failed");

}
pAppEvent->Reminder(pTaskItem);
printf("%s",pTaskItem->GetSubject());

}

Dmitry Streblechenko wrote:
[Quoted Text]
> So what is your existing code and what exactly fails?
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> <amit.deshpande4u[ at ]gmail.com> wrote in message
> news:1150179743.499092.34330[ at ]g10g2000cwb.googlegroups.com...
> > hi
> >
> > I am trying to access outlook using VC ++, i have succeeded in adding
> > reminder and getting contact list but i was unable to get reminder from
> > outlook.The class ApplicationEvents does this this functionalty and
> > also has method as
> > ApplicationEvents :: Reminder(IDispatch *LDDISPATCH) but was unable to
> > get reminder using this.
> >
> > so please reply me
> >

Re: How to get reminder Event form outlook using VC++
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 6/27/2006 5:18:41 PM
I am not sure what your code is trying to do. You cannot instantiate an
ApplicationEvents object. *Your* code must implement it (it is a
dispinterface, so it is really just an IDispatch). Subscribe to the
Application events (QI for IConnectionPointContainer, call
IConnectionPointContainer::FindConnectionPoint, then
IConnectionPoint::Advise). Whenever that event is raised, your
implementation of IDispatch::Invoke (the one you pass to
IConnectionPoint::Advise) will be called with the appropriate dispid.

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

<amit.deshpande4u[ at ]gmail.com> wrote in message
news:1151393696.728107.86200[ at ]p79g2000cwp.googlegroups.com...
[Quoted Text]
>
> here is the code
> The code is done for Outlook 2000
> {
> _ApplicationPtr pApp;
> _ItemsPtr pItems;
> MAPIFolderPtr pFolder;
> _ContactItemPtr pContact;
> HRESULT hr,hrAppEvent;
> ApplicationEventsPtr pAppEvent;
> // access outlook com
> OleInitialize (NULL);
>
> hr=pApp.CreateInstance(__uuidof(Application));
> if(FAILED(hr))
> {
> printf("Outlook Initialization failed");
>
> }
>
> _TaskItemPtr pTaskItem= pApp->CreateItem(olTaskItem);
> hrAppEvent=pAppEvent.CreateInstance(__uuidof(TaskItem));
> if(FAILED(hrAppEvent))
> {
> printf("Application Initialization failed");
>
> }
> pAppEvent->Reminder(pTaskItem);
> printf("%s",pTaskItem->GetSubject());
>
> }
>
> Dmitry Streblechenko wrote:
>> So what is your existing code and what exactly fails?
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> <amit.deshpande4u[ at ]gmail.com> wrote in message
>> news:1150179743.499092.34330[ at ]g10g2000cwb.googlegroups.com...
>> > hi
>> >
>> > I am trying to access outlook using VC ++, i have succeeded in adding
>> > reminder and getting contact list but i was unable to get reminder from
>> > outlook.The class ApplicationEvents does this this functionalty and
>> > also has method as
>> > ApplicationEvents :: Reminder(IDispatch *LDDISPATCH) but was unable to
>> > get reminder using this.
>> >
>> > so please reply me
>> >
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net