Outlook Add-in

  • Thread starter Thread starter Marius
  • Start date Start date
M

Marius

Hello,

I have made an Outlook Add-In with Visual Basic 6.0.
The Add-In makes an Toolbar and all workes fine.

Now, I want to click an Button on these Toolbar from another Programm. How
can I do this?

Thanks for an answer.

Sincerely,
Marius
 
What Outlook version? Where is the button, on an Inspector or an Explorer?

In general you can get an Explorer button for the active Explorer using code
to find the button such as:

Dim button As Office.CommandBarButton

' ol is an Outlook.Application object already instantiated, this code
assumes button added
' to Standard toolbar

Set button = ol.ActiveExplorer.CommandBars("Standard").FindControl(Tag
:= "MyTag")
If Not (button Is Nothing) Then
button.Execute
End If
 
Hey,

Thank you.

Do you have any ideas, why the Button in Outlook after this Function not
released?

Thanks,

Sincerely,
Marius
 
What do you mean it isn't released? Is it still there if Outlook is started
without your code running?

If so that means you didn't set Temporary := True when you created the
button, that Outlook didn't close properly or that you didn't delete the
button as a belt and suspenders safety precaution when the relevant Explorer
or Inspector was closed. Or a combination of all three.

I always create my UI using the Temporary argument and also delete the UI
when the container closes. That way you are never left with relic UI stored
in the outcmd.dat file.
 
Hello Ken,

I mean the Button was pressed an not released after ist was pressed.

I know that with the Temporary flaq.

It's OK but not first class.

Thank you
Sincerely,
Marius
 
Unless you change the State of the button it shouldn't look "pressed" when
you call Execute.
 
Back
Top