A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook Add-in



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 4th 07, 04:29 PM posted to microsoft.public.outlook.program_addins
Marius
external usenet poster
 
Posts: 6
Default 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

Ads
  #2  
Old October 4th 07, 05:06 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


  #3  
Old October 4th 07, 05:44 PM posted to microsoft.public.outlook.program_addins
Marius
external usenet poster
 
Posts: 6
Default 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



  #4  
Old October 4th 07, 07:26 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


  #5  
Old October 4th 07, 10:07 PM posted to microsoft.public.outlook.program_addins
Marius
external usenet poster
 
Posts: 6
Default 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



  #6  
Old October 4th 07, 10:37 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.