Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Outlook Add-in (http://www.outlookbanter.com/add-ins-outlook/58247-outlook-add.html)

Marius October 4th 07 03:29 PM

Outlook Add-in
 
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


Ken Slovak - [MVP - Outlook] October 4th 07 04:06 PM

Outlook Add-in
 
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").FindCont rol(Tag
:= "MyTag")
If Not (button Is Nothing) Then
button.Execute
End If

--
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


"Marius" wrote in message
...
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



Marius October 4th 07 04:44 PM

Outlook Add-in
 
Hey,

Thank you.

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

Thanks,

Sincerely,
Marius


"Ken Slovak - [MVP - Outlook]" schrieb im Newsbeitrag
...
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").FindCont rol(Tag
:= "MyTag")
If Not (button Is Nothing) Then
button.Execute
End If

--
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


"Marius" wrote in message
...
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




Ken Slovak - [MVP - Outlook] October 4th 07 06:26 PM

Outlook Add-in
 
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.

--
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


"Marius" wrote in message
...
Hey,

Thank you.

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

Thanks,

Sincerely,
Marius



Marius October 4th 07 09:07 PM

Outlook Add-in
 
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

"Ken Slovak - [MVP - Outlook]" schrieb im Newsbeitrag
...
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.

--
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


"Marius" wrote in message
...
Hey,

Thank you.

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

Thanks,

Sincerely,
Marius




Ken Slovak - [MVP - Outlook] October 4th 07 09:37 PM

Outlook Add-in
 
Unless you change the State of the button it shouldn't look "pressed" when
you call Execute.

--
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


"Marius" wrote in message
...
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




All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com