About state of encrypt and sign button for outlook?

Status
Not open for further replies.
R

ryotyankou

It is very strange that i couldn't get the buttons' state currently for first

time open an e-mail(draft) or create a new one. I firstly find the button

then get_State. return value is S_OK. but state is error.

When i open the second e-mail, all are ok?Why?Thank you.


 
I've often found with WordMail, if this relates to that, that Outlook loses

its references and I have to reinstantiate the button object when I want to

use something like State, even in the Click() event for that button.

"ryotyankou " <u48591@uwe> wrote in message

news:960f46eac6e84@uwe...
> It is very strange that i couldn't get the buttons' state currently for
> first
> time open an e-mail(draft) or create a new one. I firstly find the button
> then get_State. return value is S_OK. but state is error.
> When i open the second e-mail, all are ok?Why?Thank you.

> >
>
>
 
Hi, ken, My case is not as the same as what you described. If in word editor

mode, get_State is always ok. If without word editor, i found it is error if

you open for first time, close one e-mail you opened, then open any ones it

will be ok. If you don't do "close" action, it may be not correct.
- wrote:
> I've often found with WordMail, if this relates to that, that Outlook loses
> its references and I have to reinstantiate the button object when I want to
> use something like State, even in the Click() event for that button.
>
> > It is very strange that i couldn't get the buttons' state currently for
> > first
> > time open an e-mail(draft) or create a new one. I firstly find the button
> > then get_State. return value is S_OK. but state is error.
> > When i open the second e-mail, all are ok?Why?Thank you.



 
I've never seen that with the Outlook editor in any version of Outlook.

When are you getting your button references? In what event? Is it the first

Inspector.Activate() event handler? That's where you should be creating your

UI.

"ryotyankou " <u48591@uwe> wrote in message

news:961806bd4d44d@uwe...
> Hi, ken, My case is not as the same as what you described. If in word
> editor
> mode, get_State is always ok. If without word editor, i found it is error
> if
> you open for first time, close one e-mail you opened, then open any ones
> it
> will be ok. If you don't do "close" action, it may be not correct.

> - wrote:
> >I've often found with WordMail, if this relates to that, that Outlook
> >loses
> >its references and I have to reinstantiate the button object when I want
> >to
> >use something like State, even in the Click() event for that button.
> >
> >> It is very strange that i couldn't get the buttons' state currently for
> >> first
> >> time open an e-mail(draft) or create a new one. I firstly find the
> >> button
> >> then get_State. return value is S_OK. but state is error.
> >> When i open the second e-mail, all are ok?Why?Thank you.


> >
>
>
 
Outlook editor? I mean outlook use internal editor, not word editor, i called

it "outlook editor", i'm sorry for that.

Yes, you're right, i create my UI in first inspecotr Active event, and get

outlook encrypt and sign button reference before create UI.

If it is word editor, state is ok, if it is not word editor, just like what i

mentioned, if you do not close an inspector before getstate, it is not

correct.
- wrote:
> I've never seen that with the Outlook editor in any version of Outlook.

> When are you getting your button references? In what event? Is it the first
> Inspector.Activate() event handler? That's where you should be creating your
> UI.
>
> > Hi, ken, My case is not as the same as what you described. If in word
> > editor

> [quoted text clipped - 16 lines]
> >>> then get_State. return value is S_OK. but state is error.
> >>> When i open the second e-mail, all are ok?Why?Thank you.



 
Everyone calls the internal editor the Outlook editor.

I haven't seen the problem you're having at all with the Outlook editor, but

I really don't work with the sign and encrypt stuff much since there really

isn't much you can do with it in code. Post some of the code you're using to

set up your UI and maybe someone can see something to indicate why you're

having the problem you're having.

"ryotyankou " <u48591@uwe> wrote in message

news:963d59811277c@uwe...
> Outlook editor? I mean outlook use internal editor, not word editor, i
> called
> it "outlook editor", i'm sorry for that.

> Yes, you're right, i create my UI in first inspecotr Active event, and get
> outlook encrypt and sign button reference before create UI.

> If it is word editor, state is ok, if it is not word editor, just like
> what i
> mentioned, if you do not close an inspector before getstate, it is not
> correct.
>
 
It is really strange. And i check my situation again and again, it is just as

what i said.

1. outlook editor, you must open a inspector and close it, then

CommandBarButton::get_state will work. If you don't do close action,

get_state alway return Office::msoButtonUp.

2. word editor, it is ok.

my code is quite disordered, following code is just the flow:

1. OnConnection DispEventAdvise(NewInspector)

2. NewInspectorEvent Create a wrapper class and add to list.

3. In Wrapper class DispEventAdvise(InspectorActive event and Close

event)

3. InspectorActive event check if the toolbar not create yet,

CreateToolbar

4. CreateToolbar Find outlook's encrypt and sign button(here i

can get CommandBarButton

object), then get_State. Then Add new

button, set its state by checking

outlook button's state.

5. If use close inspector remove current inspector from list.

6. If use close outlook DisConnection actions.

That's all.


 
I don't know, I don't see that here. You might need to open a support case

with MS to find out what's going on.

"ryotyankou " <u48591@uwe> wrote in message

news:964ae2219e562@uwe...
> It is really strange. And i check my situation again and again, it is just
> as
> what i said.
> 1. outlook editor, you must open a inspector and close it, then
> CommandBarButton::get_state will work. If you don't do close action,
> get_state alway return Office::msoButtonUp.
> 2. word editor, it is ok.

> my code is quite disordered, following code is just the flow:
> 1. OnConnection DispEventAdvise(NewInspector)
> 2. NewInspectorEvent Create a wrapper class and add to list.
> 3. In Wrapper class DispEventAdvise(InspectorActive event and
> Close
> event)
> 3. InspectorActive event check if the toolbar not create yet,
> CreateToolbar
> 4. CreateToolbar Find outlook's encrypt and sign
> button(here i
> can get CommandBarButton
> object), then get_State. Then Add
> new
> button, set its state by checking
> outlook button's state.
> 5. If use close inspector remove current inspector from list.
> 6. If use close outlook DisConnection actions.
> That's all.

> >
>
>
 
Status
Not open for further replies.

Similar threads

Back
Top