Context Menu Question

Status
Not open for further replies.
J

John Erickson

Hi,

I think I know what you are probably going to say to this, but I thought I'd

give it a shot anyway. I read all the other messages about Context menus and

how they are unsupport, but there's this hack. I've been trying to use the

hack for my Outlook 2000 add-in, but I'm having a really strange problem. I

track down the "Context Menu", then I find the CommandBarPopup on it that I

want to add 3 buttons to. I'm able to do all that and my new buttons work

fine. I can click on them and my event gets triggered and everything is

wonderful. The thing I can't explain is that my new buttons work the first

time the context menu is displayed, but 2nd and subsequent times my buttons

are missing. When I look at the context menu collection on the 2nd and

subsequent attempts to bring it up, the controls I added to the context menu

are still there. They're enabled, visible, have a height and a width, but

they just don't show up. I've attempted to use the Delete method on my

buttons and re-add them, but I can't seem to get that to work. The delete

doesn't seem to do anything. Is there some other call I need to make to have

the delete method work? Anyone have a clue how to fix this? I'd be happy to

share code on it, but it's somewhat lengthy.

John
 
J

John Erickson

I have some new info. I just started my testing on Outlook 2002 and my

context menu problem doesn't occur there. My 3 added buttons appear on the

context menu ALL the time. Not just the first time. I'm using the exact same

code as I am for Outlook 2000. Any idea what is different in Outlook 2000

that's making my added buttons only appear the first time? Or better yet any

ideas on a work around?

John

"John Erickson" wrote:


> Hi,

> I think I know what you are probably going to say to this, but I thought I'd
> give it a shot anyway. I read all the other messages about Context menus and
> how they are unsupport, but there's this hack. I've been trying to use the
> hack for my Outlook 2000 add-in, but I'm having a really strange problem. I
> track down the "Context Menu", then I find the CommandBarPopup on it that I
> want to add 3 buttons to. I'm able to do all that and my new buttons work
> fine. I can click on them and my event gets triggered and everything is
> wonderful. The thing I can't explain is that my new buttons work the first
> time the context menu is displayed, but 2nd and subsequent times my buttons
> are missing. When I look at the context menu collection on the 2nd and
> subsequent attempts to bring it up, the controls I added to the context menu
> are still there. They're enabled, visible, have a height and a width, but
> they just don't show up. I've attempted to use the Delete method on my
> buttons and re-add them, but I can't seem to get that to work. The delete
> doesn't seem to do anything. Is there some other call I need to make to have
> the delete method work? Anyone have a clue how to fix this? I'd be happy to
> share code on it, but it's somewhat lengthy.

> John
 
K

Ken Slovak - [MVP - Outlook]

Most of the samples I've used or seen for that hack destroy the UI and

re-create it when OnUpdate() fires. Otherwise the button can go out of scope

and just sit there doing nothing. Look in the samples for a

CommandBar.Reset() call.

"John Erickson" <JohnErickson> wrote in message

news:53B04674-9152-4014-8DD7-F00722CB8034@microsoft.com...
> I have some new info. I just started my testing on Outlook 2002 and my
> context menu problem doesn't occur there. My 3 added buttons appear on the
> context menu ALL the time. Not just the first time. I'm using the exact
> same
> code as I am for Outlook 2000. Any idea what is different in Outlook 2000
> that's making my added buttons only appear the first time? Or better yet
> any
> ideas on a work around?

> John

> "John Erickson" wrote:
>
> > Hi,
>

>> I think I know what you are probably going to say to this, but I thought
> > I'd
> > give it a shot anyway. I read all the other messages about Context menus
> > and
> > how they are unsupport, but there's this hack. I've been trying to use
> > the
> > hack for my Outlook 2000 add-in, but I'm having a really strange problem.
> > I
> > track down the "Context Menu", then I find the CommandBarPopup on it that
> > I
> > want to add 3 buttons to. I'm able to do all that and my new buttons work
> > fine. I can click on them and my event gets triggered and everything is
> > wonderful. The thing I can't explain is that my new buttons work the
> > first
> > time the context menu is displayed, but 2nd and subsequent times my
> > buttons
> > are missing. When I look at the context menu collection on the 2nd and
> > subsequent attempts to bring it up, the controls I added to the context
> > menu
> > are still there. They're enabled, visible, have a height and a width, but
> > they just don't show up. I've attempted to use the Delete method on my
> > buttons and re-add them, but I can't seem to get that to work. The delete
> > doesn't seem to do anything. Is there some other call I need to make to
> > have
> > the delete method work? Anyone have a clue how to fix this? I'd be happy
> > to
> > share code on it, but it's somewhat lengthy.
>

>> John
 
J

John Erickson

That's what I'm attempting to do. I'm pretty sure my Unadvise is working

properly. Then I'm using the Delete method (in reverse item# order in case

Delete changes the item numbering as I'm traversing the controls collection).

Is the Office::CommandBarControl::Delete method the proper way to remove the

buttons I added on the first context display? I'm asking because it doesn't

seem to actually remove the controls even though it succeeds. What's the real

meaning of the bool argument in that method? There's a method called

__NewEnum (or something to that effect) should I be using that or some other

call after the Deletes to rebuild the controls collection? It's just really

odd that the same code works fine in Outlook 2002 but doesn't in Outlook 2000.

John
wrote:


> Most of the samples I've used or seen for that hack destroy the UI and
> re-create it when OnUpdate() fires. Otherwise the button can go out of scope
> and just sit there doing nothing. Look in the samples for a
> CommandBar.Reset() call.

> >

>

> "John Erickson" <JohnErickson> wrote in message
> news:53B04674-9152-4014-8DD7-F00722CB8034@microsoft.com...
> >I have some new info. I just started my testing on Outlook 2002 and my
> > context menu problem doesn't occur there. My 3 added buttons appear on the
> > context menu ALL the time. Not just the first time. I'm using the exact
> > same
> > code as I am for Outlook 2000. Any idea what is different in Outlook 2000
> > that's making my added buttons only appear the first time? Or better yet
> > any
> > ideas on a work around?
> > John
> > "John Erickson" wrote:
> >
> >> Hi,
> >
> >> I think I know what you are probably going to say to this, but I thought
> >> I'd
> >> give it a shot anyway. I read all the other messages about Context menus
> >> and
> >> how they are unsupport, but there's this hack. I've been trying to use
> >> the
> >> hack for my Outlook 2000 add-in, but I'm having a really strange problem.
> >> I
> >> track down the "Context Menu", then I find the CommandBarPopup on it that
> >> I
> >> want to add 3 buttons to. I'm able to do all that and my new buttons work
> >> fine. I can click on them and my event gets triggered and everything is
> >> wonderful. The thing I can't explain is that my new buttons work the
> >> first
> >> time the context menu is displayed, but 2nd and subsequent times my
> >> buttons
> >> are missing. When I look at the context menu collection on the 2nd and
> >> subsequent attempts to bring it up, the controls I added to the context
> >> menu
> >> are still there. They're enabled, visible, have a height and a width, but
> >> they just don't show up. I've attempted to use the Delete method on my
> >> buttons and re-add them, but I can't seem to get that to work. The delete
> >> doesn't seem to do anything. Is there some other call I need to make to
> >> have
> >> the delete method work? Anyone have a clue how to fix this? I'd be happy
> >> to
> >> share code on it, but it's somewhat lengthy.
> >
> >> John


>
 
K

Ken Slovak - [MVP - Outlook]

I use the Reset() method of the CommandBar to clear the user added controls

before I add them again in OnUpdate().

"John Erickson" <JohnErickson> wrote in message

news:DB9AD729-D35E-4FCB-A44D-69E642F20871@microsoft.com...
> That's what I'm attempting to do. I'm pretty sure my Unadvise is working
> properly. Then I'm using the Delete method (in reverse item# order in case
> Delete changes the item numbering as I'm traversing the controls
> collection).
> Is the Office::CommandBarControl::Delete method the proper way to remove
> the
> buttons I added on the first context display? I'm asking because it
> doesn't
> seem to actually remove the controls even though it succeeds. What's the
> real
> meaning of the bool argument in that method? There's a method called
> __NewEnum (or something to that effect) should I be using that or some
> other
> call after the Deletes to rebuild the controls collection? It's just
> really
> odd that the same code works fine in Outlook 2002 but doesn't in Outlook
> 2000.

> John
 
J

John Erickson

Thanks again Ken! That got me there. One note though. In my case since I was

adding buttons to a sub-menu (CommandBarPopup), it took a couple coding

attempts on my part. Initially I had been deleting the added buttons from the

collection in the CommandBarPopup (the Junk E-mail sub-menu in my case), so I

simply did the Reset() call you recommended on that CommandBarPopup object.

That resulted in the same behaviour. My added buttons appeared on the first

context menu, but not subsequent ones. In order to finally fix the problem I

had to move the Reset() up a level to the CommandBar representing the

"Context Menu". Once I did that, my added buttons now appear ALL the time. I

appreciate the guidence.

John
wrote:


> I use the Reset() method of the CommandBar to clear the user added controls
> before I add them again in OnUpdate().

> >

>

> "John Erickson" <JohnErickson> wrote in message
> news:DB9AD729-D35E-4FCB-A44D-69E642F20871@microsoft.com...
> > That's what I'm attempting to do. I'm pretty sure my Unadvise is working
> > properly. Then I'm using the Delete method (in reverse item# order in case
> > Delete changes the item numbering as I'm traversing the controls
> > collection).
> > Is the Office::CommandBarControl::Delete method the proper way to remove
> > the
> > buttons I added on the first context display? I'm asking because it
> > doesn't
> > seem to actually remove the controls even though it succeeds. What's the
> > real
> > meaning of the bool argument in that method? There's a method called
> > __NewEnum (or something to that effect) should I be using that or some
> > other
> > call after the Deletes to rebuild the controls collection? It's just
> > really
> > odd that the same code works fine in Outlook 2002 but doesn't in Outlook
> > 2000.
> > John


>
 
N

nikhil

Hello,

I am doing similar kind of thing that John ericskon is talking about.

The only difference is that i am adding menu items in the main context menu.

The problem that i am facing is, when i right click on a mail item my menu

items

are getting inserted & are working fine all the time.But when i right click

on a

non-mail item or a mail item(with attachment) outlook simply crashes.

slovak sir can you please giude me on this.

nikhil

"John Erickson" wrote:


> Thanks again Ken! That got me there. One note though. In my case since I was
> adding buttons to a sub-menu (CommandBarPopup), it took a couple coding
> attempts on my part. Initially I had been deleting the added buttons from the
> collection in the CommandBarPopup (the Junk E-mail sub-menu in my case), so I
> simply did the Reset() call you recommended on that CommandBarPopup object.
> That resulted in the same behaviour. My added buttons appeared on the first
> context menu, but not subsequent ones. In order to finally fix the problem I
> had to move the Reset() up a level to the CommandBar representing the
> "Context Menu". Once I did that, my added buttons now appear ALL the time. I
> appreciate the guidence.

> John

> " - " wrote:
>
> > I use the Reset() method of the CommandBar to clear the user added controls
> > before I add them again in OnUpdate().
> > > >

> >

> > "John Erickson" <JohnErickson> wrote in message
> > news:DB9AD729-D35E-4FCB-A44D-69E642F20871@microsoft.com...
> > > That's what I'm attempting to do. I'm pretty sure my Unadvise is working
> > > properly. Then I'm using the Delete method (in reverse item# order in case
> > > Delete changes the item numbering as I'm traversing the controls
> > > collection).
> > > Is the Office::CommandBarControl::Delete method the proper way to remove
> > > the
> > > buttons I added on the first context display? I'm asking because it
> > > doesn't
> > > seem to actually remove the controls even though it succeeds. What's the
> > > real
> > > meaning of the bool argument in that method? There's a method called
> > > __NewEnum (or something to that effect) should I be using that or some
> > > other
> > > call after the Deletes to rebuild the controls collection? It's just
> > > really
> > > odd that the same code works fine in Outlook 2002 but doesn't in Outlook
> > > 2000.
> > > > John

> >
 
K

Ken Slovak - [MVP - Outlook]

If you are going to hijack other threads at least provide enough information

for your question to be answered. I have no idea what your code is doing,

what version of Outlook, whether it's VBA or addin code or in what language,

or much of anything else other than your code isn't working right.

Are you assuming a mail item and not testing for it before instantiating a

mail item object?

"nikhil" <nikhil> wrote in message

news:53C4D3D2-DF90-4BFC-B36D-ED4189D4FB76@microsoft.com...
> Hello,

> I am doing similar kind of thing that John ericskon is talking about.
> The only difference is that i am adding menu items in the main context
> menu.
> The problem that i am facing is, when i right click on a mail item my menu
> items
> are getting inserted & are working fine all the time.But when i right
> click
> on a
> non-mail item or a mail item(with attachment) outlook simply crashes.
> slovak sir can you please giude me on this.

> nikhil
 
N

nikhil

hello sir,

thanks for your reply.

m extremely sorry for the lack of information.

I have written a Add-in for this purpose in VC++/ATL.

The same code is working fine with the Outlook XP & Outlook 2003.

But the problem is occuring in case of Outlook 2000.

Before doing this i refered following link which also contains your reply :

http://www.gtro.com/delphi/spamfilter_e.php

I am following exactly similar steps which are discussed above(handling

OnUpdate event).

My observation is mail item's(with attachment ) context menu contains more

menu items than a normal mail item's context menu does have.

so may be the case which is discussed in above link is occuring.

Don't know what exactly is happening as m just a begginer in this field.

here's my pseudo code for it:

//Everything is done in OnUpdate()

1. Enumerating CommandBars collection to locate "Context Menu".

2. spCtxtMenuCmdBar->Reset();//before exceutign this code it's crashing.

spCtxtMenuCmdBar->get_Protection(&OldCmdBarProtection);

spCtxtMenuCmdBar->put_Protection(msoBarNoProtectio);

3. Regular code for adding button into it & advise click event for it.

4. restore old protection.

Nikhil.
wrote:


> If you are going to hijack other threads at least provide enough information
> for your question to be answered. I have no idea what your code is doing,
> what version of Outlook, whether it's VBA or addin code or in what language,
> or much of anything else other than your code isn't working right.

> Are you assuming a mail item and not testing for it before instantiating a
> mail item object?

> >

>

> "nikhil" <nikhil> wrote in message
> news:53C4D3D2-DF90-4BFC-B36D-ED4189D4FB76@microsoft.com...
> > Hello,
> > I am doing similar kind of thing that John ericskon is talking about.
> > The only difference is that i am adding menu items in the main context
> > menu.
> > The problem that i am facing is, when i right click on a mail item my menu
> > items
> > are getting inserted & are working fine all the time.But when i right
> > click
> > on a
> > non-mail item or a mail item(with attachment) outlook simply crashes.
> > slovak sir can you please giude me on this.
> > nikhil


>
 
K

Ken Slovak - [MVP - Outlook]

I have no idea why you are having that problem. My suggestion would probably

be to not offer support for the context menus in Outlook 2000.

"nikhil" <nikhil> wrote in message

news:D57F543F-3A50-4237-97A4-AA7472B478DD@microsoft.com...
> hello sir,
> thanks for your reply.
> m extremely sorry for the lack of information.
> I have written a Add-in for this purpose in VC++/ATL.
> The same code is working fine with the Outlook XP & Outlook 2003.
> But the problem is occuring in case of Outlook 2000.
> Before doing this i refered following link which also contains your reply
> :
> http://www.gtro.com/delphi/spamfilter_e.php
> I am following exactly similar steps which are discussed above(handling
> OnUpdate event).
> My observation is mail item's(with attachment ) context menu contains more
> menu items than a normal mail item's context menu does have.
> so may be the case which is discussed in above link is occuring.
> Don't know what exactly is happening as m just a begginer in this field.
> here's my pseudo code for it:

> //Everything is done in OnUpdate()
> 1. Enumerating CommandBars collection to locate "Context Menu".
> 2. spCtxtMenuCmdBar->Reset();//before exceutign this code it's crashing.
> spCtxtMenuCmdBar->get_Protection(&OldCmdBarProtection);
> spCtxtMenuCmdBar->put_Protection(msoBarNoProtectio);
> 3. Regular code for adding button into it & advise click event for it.
> 4. restore old protection.

> Nikhil.
 
N

nikhil

Hello ,

Thanks for the reply.I really appreciate it.

I will still do some try outs for it.If i find something i'll surely be

posting

it here.

nikhil
wrote:


> I have no idea why you are having that problem. My suggestion would probably
> be to not offer support for the context menus in Outlook 2000.

> >

>

> "nikhil" <nikhil> wrote in message
> news:D57F543F-3A50-4237-97A4-AA7472B478DD@microsoft.com...
> > hello sir,
> > thanks for your reply.
> > m extremely sorry for the lack of information.
> > I have written a Add-in for this purpose in VC++/ATL.
> > The same code is working fine with the Outlook XP & Outlook 2003.
> > But the problem is occuring in case of Outlook 2000.
> > Before doing this i refered following link which also contains your reply
> > :
> > http://www.gtro.com/delphi/spamfilter_e.php
> > I am following exactly similar steps which are discussed above(handling
> > OnUpdate event).
> > My observation is mail item's(with attachment ) context menu contains more
> > menu items than a normal mail item's context menu does have.
> > so may be the case which is discussed in above link is occuring.
> > Don't know what exactly is happening as m just a begginer in this field.
> > here's my pseudo code for it:
> > //Everything is done in OnUpdate()
> > 1. Enumerating CommandBars collection to locate "Context Menu".
> > 2. spCtxtMenuCmdBar->Reset();//before exceutign this code it's crashing.
> > spCtxtMenuCmdBar->get_Protection(&OldCmdBarProtection);
> > spCtxtMenuCmdBar->put_Protection(msoBarNoProtectio);
> > 3. Regular code for adding button into it & advise click event for it.
> > 4. restore old protection.
> > Nikhil.


>
 
N

nikhil

Hello,

I am facing a weird issue which is as follows:

i have written a ATL/COM add-in which adds a separate toolbar & some menu

items into tools menu.

now i open a new explorer window, and then i reset the menu bar through

Customize->reset.after doing this when i now click on "Tools" menu (in newly

created window )outlook simpally crashes.

Code for adding buttons & menu items is absolutely normal.(code supports

buttons & menu items in all open explorer windows.)

this problem occurs only in Outlook 2000.

I think the problem might be similar to the one of context menus.

"nikhil" wrote:


> Hello ,

> Thanks for the reply.I really appreciate it.
> I will still do some try outs for it.If i find something i'll surely be
> posting
> it here.

> nikhil

> " - " wrote:
>
> > I have no idea why you are having that problem. My suggestion would probably
> > be to not offer support for the context menus in Outlook 2000.
> > > >

> >

> > "nikhil" <nikhil> wrote in message
> > news:D57F543F-3A50-4237-97A4-AA7472B478DD@microsoft.com...
> > > hello sir,
> > > thanks for your reply.
> > > m extremely sorry for the lack of information.
> > > I have written a Add-in for this purpose in VC++/ATL.
> > > The same code is working fine with the Outlook XP & Outlook 2003.
> > > But the problem is occuring in case of Outlook 2000.
> > > Before doing this i refered following link which also contains your reply
> > > :
> > > http://www.gtro.com/delphi/spamfilter_e.php
> > > I am following exactly similar steps which are discussed above(handling
> > > OnUpdate event).
> > > My observation is mail item's(with attachment ) context menu contains more
> > > menu items than a normal mail item's context menu does have.
> > > so may be the case which is discussed in above link is occuring.
> > > Don't know what exactly is happening as m just a begginer in this field.
> > > here's my pseudo code for it:
> > > > //Everything is done in OnUpdate()
> > > 1. Enumerating CommandBars collection to locate "Context Menu".
> > > 2. spCtxtMenuCmdBar->Reset();//before exceutign this code it's crashing.
> > > spCtxtMenuCmdBar->get_Protection(&OldCmdBarProtection);
> > > spCtxtMenuCmdBar->put_Protection(msoBarNoProtectio);
> > > 3. Regular code for adding button into it & advise click event for it.
> > > 4. restore old protection.
> > > > Nikhil.

> >
 
K

Ken Slovak - [MVP - Outlook]

It sounds like your code is assuming that something will be there which now

isn't due to the customization reset, but I have no idea what. Are you

referring to any of the UI you are creating or assuming will be there in any

events earlier than the first Inspector.Activate() event?

"nikhil" <nikhil> wrote in message

news:07940CC4-5368-4DF8-BF4C-FDC3A6C0E7AE@microsoft.com...
> Hello,

> I am facing a weird issue which is as follows:
> i have written a ATL/COM add-in which adds a separate toolbar & some menu
> items into tools menu.
> now i open a new explorer window, and then i reset the menu bar through
> Customize->reset.after doing this when i now click on "Tools" menu (in
> newly
> created window )outlook simpally crashes.
> Code for adding buttons & menu items is absolutely normal.(code supports
> buttons & menu items in all open explorer windows.)
> this problem occurs only in Outlook 2000.
> I think the problem might be similar to the one of context menus.
>
 
N

nikhil

Hello,

Thanks for the reply.

yes i am referring to the menu items which i inserted into Tools menu.

i am calling put_enabled(VARIANT_FALSE), which eventually fails, because of

absence of menu items,thats alright.And i am creating my UI in the first

activate event of explorer window(not inspector window).

is this problem already present in outlook2000 ?(like the one of context

menu )

i am not getting why this is happening.
wrote:


> It sounds like your code is assuming that something will be there which now
> isn't due to the customization reset, but I have no idea what. Are you
> referring to any of the UI you are creating or assuming will be there in any
> events earlier than the first Inspector.Activate() event?

> >

>

> "nikhil" <nikhil> wrote in message
> news:07940CC4-5368-4DF8-BF4C-FDC3A6C0E7AE@microsoft.com...
> > Hello,
> > I am facing a weird issue which is as follows:
> > i have written a ATL/COM add-in which adds a separate toolbar & some menu
> > items into tools menu.
> > now i open a new explorer window, and then i reset the menu bar through
> > Customize->reset.after doing this when i now click on "Tools" menu (in
> > newly
> > created window )outlook simpally crashes.
> > Code for adding buttons & menu items is absolutely normal.(code supports
> > buttons & menu items in all open explorer windows.)
> > this problem occurs only in Outlook 2000.
> > I think the problem might be similar to the one of context menus.
> >


>
 
K

Ken Slovak - [MVP - Outlook]

Don't assume the UI is there. Test for it and if it's not there re-create it

again.

"nikhil" <nikhil> wrote in message

news:B611CACB-B28B-48BC-B576-1893B7335F5C@microsoft.com...
> Hello,

> Thanks for the reply.
> yes i am referring to the menu items which i inserted into Tools menu.
> i am calling put_enabled(VARIANT_FALSE), which eventually fails, because
> of
> absence of menu items,thats alright.And i am creating my UI in the first
> activate event of explorer window(not inspector window).
> is this problem already present in outlook2000 ?(like the one of context
> menu )
> i am not getting why this is happening.
 
N

nikhil

Hello,

Thanks again for your immediate response.

I am checking for the existence of my menu items in Update event.

When i don't find them, i am adding those menu items again as per

discussion. But still it results the same.
wrote:


> Don't assume the UI is there. Test for it and if it's not there re-create it
> again.

> >

>

> "nikhil" <nikhil> wrote in message
> news:B611CACB-B28B-48BC-B576-1893B7335F5C@microsoft.com...
> > Hello,
> > Thanks for the reply.
> > yes i am referring to the menu items which i inserted into Tools menu.
> > i am calling put_enabled(VARIANT_FALSE), which eventually fails, because
> > of
> > absence of menu items,thats alright.And i am creating my UI in the first
> > activate event of explorer window(not inspector window).
> > is this problem already present in outlook2000 ?(like the one of context
> > menu )
> > i am not getting why this is happening.


>
 
N

nikhil

Hello,

Thanks for your immediate response again.

I am searching for my menu items in Update event.

When i don't found them, i am creating them as per discussion.

But still the problem remains.

can you suggest any link which has sample code for adding menu items.

(probably in VB) so that i can cross check in Outlook 2000.
wrote:


> Don't assume the UI is there. Test for it and if it's not there re-create it
> again.

> >

>

> "nikhil" <nikhil> wrote in message
> news:B611CACB-B28B-48BC-B576-1893B7335F5C@microsoft.com...
> > Hello,
> > Thanks for the reply.
> > yes i am referring to the menu items which i inserted into Tools menu.
> > i am calling put_enabled(VARIANT_FALSE), which eventually fails, because
> > of
> > absence of menu items,thats alright.And i am creating my UI in the first
> > activate event of explorer window(not inspector window).
> > is this problem already present in outlook2000 ?(like the one of context
> > menu )
> > i am not getting why this is happening.


>
 
K

Ken Slovak - [MVP - Outlook]

Go to www.outlookcode.com and search on "context menu". There are a number

of samples there, including in C++ I think, as well as threads on problems

with context menus. Something there might be related to your problem.

"nikhil" <nikhil> wrote in message

news:3DAF7D86-1D78-495F-9383-5CA7BD172C43@microsoft.com...
> Hello,

> Thanks for your immediate response again.
> I am searching for my menu items in Update event.
> When i don't found them, i am creating them as per discussion.
> But still the problem remains.
> can you suggest any link which has sample code for adding menu items.
> (probably in VB) so that i can cross check in Outlook 2000.
 
N

nikhil

Hello,

Thanks for immediate response again.

I tried searching for my menu items in Update event(as reseting the menu bar

should update commandbars collection.)

and when i don't find them, i create them again but still same problem

remains.
wrote:


> Don't assume the UI is there. Test for it and if it's not there re-create it
> again.

> >

>

> "nikhil" <nikhil> wrote in message
> news:B611CACB-B28B-48BC-B576-1893B7335F5C@microsoft.com...
> > Hello,
> > Thanks for the reply.
> > yes i am referring to the menu items which i inserted into Tools menu.
> > i am calling put_enabled(VARIANT_FALSE), which eventually fails, because
> > of
> > absence of menu items,thats alright.And i am creating my UI in the first
> > activate event of explorer window(not inspector window).
> > is this problem already present in outlook2000 ?(like the one of context
> > menu )
> > i am not getting why this is happening.


>
 
N

nikhil

Hello,

Thanks for your immediate response again.

I am searching for my menu items in Update event now.

as reseting the menu bar should update the commandbars collection.

when i don't find them i create them again, but still the problem exists.

For all other version of Outlook code running fine.

(It is happening in case of Outlook 2000 only.)
wrote:


> Don't assume the UI is there. Test for it and if it's not there re-create it
> again.

> >

>

> "nikhil" <nikhil> wrote in message
> news:B611CACB-B28B-48BC-B576-1893B7335F5C@microsoft.com...
> > Hello,
> > Thanks for the reply.
> > yes i am referring to the menu items which i inserted into Tools menu.
> > i am calling put_enabled(VARIANT_FALSE), which eventually fails, because
> > of
> > absence of menu items,thats alright.And i am creating my UI in the first
> > activate event of explorer window(not inspector window).
> > is this problem already present in outlook2000 ?(like the one of context
> > menu )
> > i am not getting why this is happening.


>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A Missing context menu on Location field Using Outlook 2
S How to add a new menu item to a right click context menu of a link Using Outlook 5
R What happen to 'View Attachments' context menu item in Outlook 2010? Using Outlook 6
S Ad Context Menu in Outlook 2007 Outlook VBA and Custom Forms 1
T Context menu for new message window Outlook VBA and Custom Forms 7
T Outlook 2010 context menu changes Outlook VBA and Custom Forms 3
H email editor context menu 2007. Outlook VBA and Custom Forms 1
C Event Capture - Item Context Menu (Delete). Can you hook it? Outlook VBA and Custom Forms 1
D Outlook missing Open With Context Using Outlook 1
N Which Button Was Clicked on the Ribbonbar Menu Outlook VBA and Custom Forms 2
N Multiple instances of Outlook on Start Menu Using Outlook 2
J Missing BCM TAB Main Menu - 2007 BCM (Business Contact Manager) 2
Emerogork How do I remove "Delete Folder" from the right-click menu? Using Outlook 1
E Searching a Shared Outlook Mailbox from the start menu? Using Outlook 4
L Add to Right Click Menu Using Outlook 10
R Missing Backup command in File menu after installing pfback.exe Using Outlook 2
P Cannot open Options Menu Outlook 2007 and Cannot create a new profile Using Outlook 0
M Missing New Menu Option in Outlook 2010 Using Outlook 0
B Trouble Locating Tools Menu since There's No Standard Toolbar in Office 2010 Using Outlook 1
C Tasks > Field Chooser > Fields with dropdown menu (eg. Status). How to custom? Using Outlook 6
T Outlook 2003 menu graphical glitch Using Outlook 5
H Outlook 2010 Advanced Find - Menu items missing Using Outlook 1
S Removing "Research" menu item Outlook VBA and Custom Forms 1
M Files in "Attach File" popup menu no longer alphabetical Using Outlook 3
A disable a menu in active inspector Outlook VBA and Custom Forms 1
Z Right click menu Outlook VBA and Custom Forms 4
A Extending Presona Menu in Outlook Outlook VBA and Custom Forms 9
M How to get the preview pane handle, when it is created with menu c Outlook VBA and Custom Forms 1
C Cannot access macro menu in OL2003 Outlook VBA and Custom Forms 2
H access appointmentItem from ribbon menu Outlook VBA and Custom Forms 1
U Adding multiple menu Items. Problems handling the click events Outlook VBA and Custom Forms 1
R Errors while adding new item to main menu Outlook VBA and Custom Forms 4
S I have a Question on location of a Custom Outlook menu for my ADDI Outlook VBA and Custom Forms 1
S Question of setting the order of a custom menu in Outlook Outlook VBA and Custom Forms 1
O Newbie question: how to sync two Outlook -Exchange and IMAP- calendars? Using Outlook 4
D a general question re how backup programs handle pst files ... I have no problems, just curious Using Outlook 1
e_a_g_l_e_p_i A few question before I decide to switch to Pop from imap Using Outlook 9
D.Moore SendAndReceive question Outlook VBA and Custom Forms 2
J Transport Rule to detect Keyword question.. Exchange Server Administration 2
N Question Using Outlook 8
D Shared Mailbox question Exchange Server Administration 1
CWM030 Another Quarantine question Exchange Server Administration 0
E Outlook 2010 Can somebody tell me , the question associated with OST format Using Outlook 1
CWM030 A quick question for Diane about Exchange Exchange Server Administration 2
CWM030 Email Catagorties question Using Outlook 1
MahdeeyaAbdulla Friend's outlook question Using Outlook 1
e_a_g_l_e_p_i Question about address book in Outlook 2010 Using Outlook 9
M Question about nested distribution lists Outlook VBA and Custom Forms 3
e_a_g_l_e_p_i A question about installing office 2013 Pro and using my .pst from office 2010 Using Outlook 12
rerun101 Question about message options Outlook VBA and Custom Forms 4

Similar threads

Top