PC Review


Reply
Thread Tools Rate Thread

how to capture events for next item

 
 
Ashish
Guest
Posts: n/a
 
      30th Oct 2009
In outlook 2003, When open a mail there are 2 buttons in statndard menu
which are Next Item and Previous Item (in arrow symbol) in open mail window.
I am not able to capture events for these two buttons. Besides these i can
capture events for other buttons on standard menu. I can not know in my
addin when user click on these buttons. Their ids are 359 and 360.Please
suggest how to capture events for those.


 
Reply With Quote
 
 
 
 
Heinz-Josef Bomanns
Guest
Posts: n/a
 
      31st Oct 2009
Hallo Ashish,

>In outlook 2003, When open a mail there are 2 buttons in statndard menu
>which are Next Item and Previous Item (in arrow symbol) in open mail window.
>I am not able to capture events for these two buttons. Besides these i can
>capture events for other buttons on standard menu. I can not know in my
>addin when user click on these buttons. Their ids are 359 and 360.Please
>suggest how to capture events for those.


You can try to put references to the two buttons for e.g. in variables
(declared 'As Office.CommandbarButton') "btnID359" and "btnID360",
then hide the buttons (.Visible= False) and add your own buttons with
the same positions and FaceIDs. In the appropriated event procs of
your buttons do what you have to do and finally do call
"btnID359.Execute" or "btnID360.Execute" to run the original
functionallity. Just some theoretical thoughts, but worth a try i
think...


--

So long...
...Bomi

> !!! In case you want to reply via email please use Reply-To address and remove underscores (_) !!!

 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      31st Oct 2009
Thanks for this info.

>> then hide the buttons (.Visible= False) and add your own buttons with


Does it mean it is not possible to capture events for these buttons. Outlook
does not provide that?
"Heinz-Josef Bomanns" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hallo Ashish,
>
>>In outlook 2003, When open a mail there are 2 buttons in statndard menu
>>which are Next Item and Previous Item (in arrow symbol) in open mail
>>window.
>>I am not able to capture events for these two buttons. Besides these i can
>>capture events for other buttons on standard menu. I can not know in my
>>addin when user click on these buttons. Their ids are 359 and 360.Please
>>suggest how to capture events for those.

>
> You can try to put references to the two buttons for e.g. in variables
> (declared 'As Office.CommandbarButton') "btnID359" and "btnID360",
> then hide the buttons (.Visible= False) and add your own buttons with
> the same positions and FaceIDs. In the appropriated event procs of
> your buttons do what you have to do and finally do call
> "btnID359.Execute" or "btnID360.Execute" to run the original
> functionallity. Just some theoretical thoughts, but worth a try i
> think...
>
>
> --
>
> So long...
> ...Bomi
>
>> !!! In case you want to reply via email please use Reply-To address and
>> remove underscores (_) !!!



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      1st Nov 2009
The problem is you are handling events for a specific
Inspector.CommandBars.CommandBarButton object. Clicking Next or Previous
will open a new Inspector in Outlook 2003.

Why do you need to handle events for those specific button clicks?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Thanks for this info.
>
>>> then hide the buttons (.Visible= False) and add your own buttons with

>
> Does it mean it is not possible to capture events for these buttons.
> Outlook does not provide that?


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      2nd Nov 2009
Oh it means when we click on nexe/previous item a new inspector open.
> Why do you need to handle events for those specific button clicks?


Because when we click on next/previous button outlook first call
onnewinspector while another inspector is not close. After this outlook call
close inspector for another inspector. And the main problem is outlook never
call item_open event for new inspector.

"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> The problem is you are handling events for a specific
> Inspector.CommandBars.CommandBarButton object. Clicking Next or Previous
> will open a new Inspector in Outlook 2003.
>
> Why do you need to handle events for those specific button clicks?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "Ashish" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Thanks for this info.
>>
>>>> then hide the buttons (.Visible= False) and add your own buttons with

>>
>> Does it mean it is not possible to capture events for these buttons.
>> Outlook does not provide that?

>



 
Reply With Quote
 
Heinz-Josef Bomanns
Guest
Posts: n/a
 
      2nd Nov 2009
Hallo Ashish,

>Does it mean it is not possible to capture events for these buttons. Outlook
>does not provide that?


Yes...


>"Heinz-Josef Bomanns" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> Hallo Ashish,
>>
>>>In outlook 2003, When open a mail there are 2 buttons in statndard menu
>>>which are Next Item and Previous Item (in arrow symbol) in open mail
>>>window.
>>>I am not able to capture events for these two buttons. Besides these i can
>>>capture events for other buttons on standard menu. I can not know in my
>>>addin when user click on these buttons. Their ids are 359 and 360.Please
>>>suggest how to capture events for those.

>>
>> You can try to put references to the two buttons for e.g. in variables
>> (declared 'As Office.CommandbarButton') "btnID359" and "btnID360",
>> then hide the buttons (.Visible= False) and add your own buttons with
>> the same positions and FaceIDs. In the appropriated event procs of
>> your buttons do what you have to do and finally do call
>> "btnID359.Execute" or "btnID360.Execute" to run the original
>> functionallity. Just some theoretical thoughts, but worth a try i
>> think...



--

So long...
...Bomi

> !!! In case you want to reply via email please use Reply-To address and remove underscores (_) !!!

 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      2nd Nov 2009
How outlook calls its event when i open a mail and close it

open a mail, outlook call onnewinspector. In this i get
inspector.currentitem and registered events for current item.
Then outlook call item_open event, i add a attachment in current item but do
not call item->Save. Now when mail display it shows an attachment. After
this when i close this mail outlook call item_close. Here i delete that
attachment and call save function. After this outlook call inspector_close.

Now for the case when i click on next/previous item

open a mail, outlook call onnewinspector. In this i get
inspector.currentitem and registered events for current item.
Then outlook call item_open event, i add a attachment in current item but do
not call item->Save. Now when mail display it shows an attachment. When i
click on next button outlook call inspector_close (here it did not call
item_close). Then it call onnewinspector for next mail. After that outlook
call item_close for previous mail. And outlook does not call item_open for
next mail.

I have 2 problems here.
1. For next mail since i do not get item_open event so can not add a
attachment in next mail.
2. Since for this case outlook calls inspector_close event (did not call
item_close event and i add a attachment in mail, means i modify the mail )
so outlook prompts a message "Do you want to save".
Since item_close is not called, In inspector_close i delete attachment from
mail and save it but still outlook displays the message "Do you want to
save".

Thats why i ask how to register events for next/previous button. But since
it's not possible so is there any solution for that problem.


 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      2nd Nov 2009
I don't really see a solution since you are changing items without saving
them. That will force the prompts. We've gone over various other problems
caused by this structure, about all I can think of other than not adding the
attachments or saving the items is to disable those buttons so they can't be
used.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" <(E-Mail Removed)> wrote in message
news:emzFS%(E-Mail Removed)...
> How outlook calls its event when i open a mail and close it
>
> open a mail, outlook call onnewinspector. In this i get
> inspector.currentitem and registered events for current item.
> Then outlook call item_open event, i add a attachment in current item but
> do not call item->Save. Now when mail display it shows an attachment.
> After this when i close this mail outlook call item_close. Here i delete
> that attachment and call save function. After this outlook call
> inspector_close.
>
> Now for the case when i click on next/previous item
>
> open a mail, outlook call onnewinspector. In this i get
> inspector.currentitem and registered events for current item.
> Then outlook call item_open event, i add a attachment in current item but
> do not call item->Save. Now when mail display it shows an attachment. When
> i click on next button outlook call inspector_close (here it did not call
> item_close). Then it call onnewinspector for next mail. After that
> outlook call item_close for previous mail. And outlook does not call
> item_open for next mail.
>
> I have 2 problems here.
> 1. For next mail since i do not get item_open event so can not add a
> attachment in next mail.
> 2. Since for this case outlook calls inspector_close event (did not call
> item_close event and i add a attachment in mail, means i modify the mail )
> so outlook prompts a message "Do you want to save".
> Since item_close is not called, In inspector_close i delete attachment
> from mail and save it but still outlook displays the message "Do you want
> to save".
>
> Thats why i ask how to register events for next/previous button. But since
> it's not possible so is there any solution for that problem.
>


 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      5th Nov 2009
Previous and next button and popup button. Under Previous/Next button there
are many control buttons. We can capture event for these control buttons not
for these popup button.
Does outlook not support to capture event for a popup button when it's
clicked.

"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I don't really see a solution since you are changing items without saving
>them. That will force the prompts. We've gone over various other problems
>caused by this structure, about all I can think of other than not adding
>the attachments or saving the items is to disable those buttons so they
>can't be used.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "Ashish" <(E-Mail Removed)> wrote in message
> news:emzFS%(E-Mail Removed)...
>> How outlook calls its event when i open a mail and close it
>>
>> open a mail, outlook call onnewinspector. In this i get
>> inspector.currentitem and registered events for current item.
>> Then outlook call item_open event, i add a attachment in current item but
>> do not call item->Save. Now when mail display it shows an attachment.
>> After this when i close this mail outlook call item_close. Here i delete
>> that attachment and call save function. After this outlook call
>> inspector_close.
>>
>> Now for the case when i click on next/previous item
>>
>> open a mail, outlook call onnewinspector. In this i get
>> inspector.currentitem and registered events for current item.
>> Then outlook call item_open event, i add a attachment in current item but
>> do not call item->Save. Now when mail display it shows an attachment.
>> When i click on next button outlook call inspector_close (here it did not
>> call item_close). Then it call onnewinspector for next mail. After that
>> outlook call item_close for previous mail. And outlook does not call
>> item_open for next mail.
>>
>> I have 2 problems here.
>> 1. For next mail since i do not get item_open event so can not add a
>> attachment in next mail.
>> 2. Since for this case outlook calls inspector_close event (did not call
>> item_close event and i add a attachment in mail, means i modify the
>> mail ) so outlook prompts a message "Do you want to save".
>> Since item_close is not called, In inspector_close i delete attachment
>> from mail and save it but still outlook displays the message "Do you want
>> to save".
>>
>> Thats why i ask how to register events for next/previous button. But
>> since it's not possible so is there any solution for that problem.
>>

>



 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      5th Nov 2009
There are a number of different commandbar controls that MS uses that
outside programmers can't get at or use ourselves. As I said, I don't see a
solution to get those clicks.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Previous and next button and popup button. Under Previous/Next button
> there are many control buttons. We can capture event for these control
> buttons not for these popup button.
> Does outlook not support to capture event for a popup button when it's
> clicked.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Next Item & Previous Item Events tneslony@gmail.com Microsoft Outlook Program Addins 1 7th May 2009 09:02 AM
Capture list item events in list class justageezer Microsoft VB .NET 1 20th Oct 2008 09:57 AM
Bug with nested repeaters. Item events are called twice per item =?Utf-8?B?SmFtZXMgR2V1cnRz?= Microsoft ASP .NET 4 28th Mar 2007 02:46 AM
Item open events and double click events in exchange client extension. Fanxa Microsoft Outlook Program Addins 1 9th Aug 2006 08:18 AM
Capture FTP events =?Utf-8?B?QnJpYW4=?= Microsoft Access VBA Modules 1 16th Feb 2006 04:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:56 PM.