Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   click a button on the toolbar (via VBA?) (http://www.outlookbanter.com/outlook-vba/13146-click-button-toolbar-via-vba.html)

Dan April 28th 06 03:17 PM

click a button on the toolbar (via VBA?)
 
hi there,

I do have a plugin (Red Oxygen Outlook COM Add-In) installed on Outlook
2003. That plugin adds a button to the toolbar which allows me to send SMS
trhough my local provider. Unfortunately, there is no programmatic (library)
access to that plugin. The functionality is very primitive. I click the
button and a form opens that allows me to enter a name for the receiver
(that one will be checked against the directory or the Outlook contacts), a
text to be sent and that's about it.

There is no way I can see to fire up that form except to click on that
button. I wonder if there might be a way to add some more functionality,
like adding that tool to the right click menu of a contact and initiate a
send from there.

is there a way to use VBA to click on a button in the toolbar that does not
expose itself in the library?

thanks

dan



Michael Bauer April 30th 06 09:04 AM

click a button on the toolbar (via VBA?)
 
Am Fri, 28 Apr 2006 16:17:05 +0200 schrieb Dan:

Dan, you could use the CommandBars.FindControl function to get a reference
on that button. For a CommandBarButton you can then call its Execute method,
thatīs similar to a click on that button. But thatīs it. You still need to
do a click somewhere and then enter more information, so I donīt see any
advantage.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


hi there,

I do have a plugin (Red Oxygen Outlook COM Add-In) installed on Outlook
2003. That plugin adds a button to the toolbar which allows me to send SMS
trhough my local provider. Unfortunately, there is no programmatic

(library)
access to that plugin. The functionality is very primitive. I click the
button and a form opens that allows me to enter a name for the receiver
(that one will be checked against the directory or the Outlook contacts),

a
text to be sent and that's about it.

There is no way I can see to fire up that form except to click on that
button. I wonder if there might be a way to add some more functionality,
like adding that tool to the right click menu of a contact and initiate a
send from there.

is there a way to use VBA to click on a button in the toolbar that does

not
expose itself in the library?

thanks

dan


Dan May 1st 06 12:03 PM

click a button on the toolbar (via VBA?)
 
Thanks a lot for that pointer, Michael.

I found the button with OutlookSpy:
CommandBars.Item("Desktop SMS").Controls.Item("New S&MS")

could you eventually point me to a description on how to do that execute
method? I am not quite a specialist on programming.

thanks a lot

dan


"Michael Bauer" wrote in message
...
Am Fri, 28 Apr 2006 16:17:05 +0200 schrieb Dan:

Dan, you could use the CommandBars.FindControl function to get a reference
on that button. For a CommandBarButton you can then call its Execute
method,
thatīs similar to a click on that button. But thatīs it. You still need to
do a click somewhere and then enter more information, so I donīt see any
advantage.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


hi there,

I do have a plugin (Red Oxygen Outlook COM Add-In) installed on Outlook
2003. That plugin adds a button to the toolbar which allows me to send
SMS
trhough my local provider. Unfortunately, there is no programmatic

(library)
access to that plugin. The functionality is very primitive. I click the
button and a form opens that allows me to enter a name for the receiver
(that one will be checked against the directory or the Outlook contacts),

a
text to be sent and that's about it.

There is no way I can see to fire up that form except to click on that
button. I wonder if there might be a way to add some more functionality,
like adding that tool to the right click menu of a contact and initiate a
send from there.

is there a way to use VBA to click on a button in the toolbar that does

not
expose itself in the library?

thanks

dan




Sue Mosher [MVP-Outlook] May 1st 06 12:44 PM

click a button on the toolbar (via VBA?)
 
Dan, I think the page at http://www.outlookcode.com/d/tips/commandbarfun.htm should give you plenty of examples.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dan" wrote in message ...
Thanks a lot for that pointer, Michael.

I found the button with OutlookSpy:
CommandBars.Item("Desktop SMS").Controls.Item("New S&MS")

could you eventually point me to a description on how to do that execute
method? I am not quite a specialist on programming.

thanks a lot

dan


"Michael Bauer" wrote in message
...
Am Fri, 28 Apr 2006 16:17:05 +0200 schrieb Dan:

Dan, you could use the CommandBars.FindControl function to get a reference
on that button. For a CommandBarButton you can then call its Execute
method,
thatīs similar to a click on that button. But thatīs it. You still need to
do a click somewhere and then enter more information, so I donīt see any
advantage.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


hi there,

I do have a plugin (Red Oxygen Outlook COM Add-In) installed on Outlook
2003. That plugin adds a button to the toolbar which allows me to send
SMS
trhough my local provider. Unfortunately, there is no programmatic

(library)
access to that plugin. The functionality is very primitive. I click the
button and a form opens that allows me to enter a name for the receiver
(that one will be checked against the directory or the Outlook contacts),

a
text to be sent and that's about it.

There is no way I can see to fire up that form except to click on that
button. I wonder if there might be a way to add some more functionality,
like adding that tool to the right click menu of a contact and initiate a
send from there.

is there a way to use VBA to click on a button in the toolbar that does

not
expose itself in the library?

thanks

dan




Dan May 1st 06 01:39 PM

click a button on the toolbar (via VBA?)
 
I investigated a little more and found a similar thing on Sue's website at
http://www.outlookcode.com/codedetail.aspx?id=350. I made some changes and
the result is below. However, it does not work. apparently I do something
wrong. the ID as from OutlookSpy is 1, but is 1 for all external COM
add-ins. so I thought I'd would try the statement below..

any idea why there is no ID to be found?


Sub ToggleSMS()
Dim objOL As Outlook.Application
Dim objExpl As Outlook.Explorer
Dim objCBB As Office.CommandBarButton
On Error Resume Next

Set objOL = CreateObject("Outlook.Application")
Set objExpl = objOL.ActiveExplorer
Set objCBB = objExpl.CommandBars.FindControl(, ID:= _
CommandBars.Item("Desktop SMS").Controls.Item("New S&MS").ID)
objCBB.Execute

Set objOL = Nothing
Set objExpl = Nothing
Set objCBB = Nothing
End Sub


"Dan" wrote in message
...
Thanks a lot for that pointer, Michael.

I found the button with OutlookSpy:
CommandBars.Item("Desktop SMS").Controls.Item("New S&MS")

could you eventually point me to a description on how to do that execute
method? I am not quite a specialist on programming.

thanks a lot

dan


"Michael Bauer" wrote in message
...
Am Fri, 28 Apr 2006 16:17:05 +0200 schrieb Dan:

Dan, you could use the CommandBars.FindControl function to get a
reference
on that button. For a CommandBarButton you can then call its Execute
method,
thatīs similar to a click on that button. But thatīs it. You still need
to
do a click somewhere and then enter more information, so I donīt see any
advantage.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


hi there,

I do have a plugin (Red Oxygen Outlook COM Add-In) installed on Outlook
2003. That plugin adds a button to the toolbar which allows me to send
SMS
trhough my local provider. Unfortunately, there is no programmatic

(library)
access to that plugin. The functionality is very primitive. I click the
button and a form opens that allows me to enter a name for the receiver
(that one will be checked against the directory or the Outlook
contacts),

a
text to be sent and that's about it.

There is no way I can see to fire up that form except to click on that
button. I wonder if there might be a way to add some more functionality,
like adding that tool to the right click menu of a contact and initiate
a
send from there.

is there a way to use VBA to click on a button in the toolbar that does

not
expose itself in the library?

thanks

dan






Dan May 1st 06 02:23 PM

click a button on the toolbar (via VBA?)
 
Ah!
Got it. The Lookout sample pushed me into the right direction. Thanks a lot,
Sue. Now I can at least open the form. A pity that there seems no way to
fill in thge address field of that form from the context...

Dan

"Sue Mosher [MVP-Outlook]" wrote in message
...
Dan, I think the page at http://www.outlookcode.com/d/tips/commandbarfun.htm
should give you plenty of examples.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dan" wrote in message
...
Thanks a lot for that pointer, Michael.

I found the button with OutlookSpy:
CommandBars.Item("Desktop SMS").Controls.Item("New S&MS")

could you eventually point me to a description on how to do that execute
method? I am not quite a specialist on programming.

thanks a lot

dan


"Michael Bauer" wrote in message
...
Am Fri, 28 Apr 2006 16:17:05 +0200 schrieb Dan:

Dan, you could use the CommandBars.FindControl function to get a
reference
on that button. For a CommandBarButton you can then call its Execute
method,
thatīs similar to a click on that button. But thatīs it. You still need
to
do a click somewhere and then enter more information, so I donīt see any
advantage.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


hi there,

I do have a plugin (Red Oxygen Outlook COM Add-In) installed on Outlook
2003. That plugin adds a button to the toolbar which allows me to send
SMS
trhough my local provider. Unfortunately, there is no programmatic

(library)
access to that plugin. The functionality is very primitive. I click the
button and a form opens that allows me to enter a name for the receiver
(that one will be checked against the directory or the Outlook
contacts),

a
text to be sent and that's about it.

There is no way I can see to fire up that form except to click on that
button. I wonder if there might be a way to add some more functionality,
like adding that tool to the right click menu of a contact and initiate
a
send from there.

is there a way to use VBA to click on a button in the toolbar that does

not
expose itself in the library?

thanks

dan






Michael Bauer May 2nd 06 06:26 AM

click a button on the toolbar (via VBA?)
 
Am Mon, 1 May 2006 15:23:46 +0200 schrieb Dan:


As I told you, youīll get no advantage - except of learning something :-)

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --

Ah!
Got it. The Lookout sample pushed me into the right direction. Thanks a

lot,
Sue. Now I can at least open the form. A pity that there seems no way to
fill in thge address field of that form from the context...

Dan

"Sue Mosher [MVP-Outlook]" wrote in message
...
Dan, I think the page at

http://www.outlookcode.com/d/tips/commandbarfun.htm
should give you plenty of examples.


Dan May 2nd 06 09:35 AM

click a button on the toolbar (via VBA?)
 

As I told you, youīll get no advantage - except of learning something :-)


and learning is ALWAYS a good thing.
thanks

Dan





All times are GMT +1. The time now is 04:09 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-2006 OutlookBanter.com