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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , ,

CommandBars collection in Outlook





 
 
Thread Tools Display Modes
  #1  
Old October 15th 06, 12:33 PM posted to microsoft.public.outlook.program_vba
mml
external usenet poster
 
Posts: 5
Default CommandBars collection in Outlook


Hi,

Does anybody know how to add a CommandBar Button in Outlook 2000 by code ?

The CommandBar(s) collection and item don't seem to be recognized by
Outlook, although Access knows them...

Marc


Ads
  #2  
Old October 15th 06, 12:59 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,605
Default CommandBars collection in Outlook

If you look in the object browser, you'll see that in Outlook, CommandBars is a child object of the Inspector and Explorer window objects, not the Application object. See http://www.outlookcode.com/d/tips/commandbarfun.htm

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

"mml" wrote in message ...

Hi,

Does anybody know how to add a CommandBar Button in Outlook 2000 by code ?

The CommandBar(s) collection and item don't seem to be recognized by
Outlook, although Access knows them...

Marc


  #3  
Old October 17th 06, 07:16 PM posted to microsoft.public.outlook.program_vba
mml
external usenet poster
 
Posts: 5
Default CommandBars collection in Outlook

Thank you for your help.
But now, by code, I try to link the new button with lines of code on the "on
click" event, but I don't succeed .
Can you help me ?

Best regards.



"Sue Mosher [MVP-Outlook]" a écrit dans le message
de ...
If you look in the object browser, you'll see that in Outlook, CommandBars
is a child object of the Inspector and Explorer window objects, not the
Application object. See http://www.outlookcode.com/d/tips/commandbarfun.htm

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

"mml" wrote in message
...

Hi,

Does anybody know how to add a CommandBar Button in Outlook 2000 by code ?

The CommandBar(s) collection and item don't seem to be recognized by
Outlook, although Access knows them...

Marc




  #4  
Old October 18th 06, 01:02 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,605
Default CommandBars collection in Outlook

Did you look at the Items Command Bar sample from that page? It's a great COM add-in example of adding a toolbar button.

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

"mml" wrote in message ...
Thank you for your help.
But now, by code, I try to link the new button with lines of code on the "on
click" event, but I don't succeed .
Can you help me ?

Best regards.



"Sue Mosher [MVP-Outlook]" a écrit dans le message
de ...
If you look in the object browser, you'll see that in Outlook, CommandBars
is a child object of the Inspector and Explorer window objects, not the
Application object. See http://www.outlookcode.com/d/tips/commandbarfun.htm

"mml" wrote in message
...

Hi,

Does anybody know how to add a CommandBar Button in Outlook 2000 by code ?

The CommandBar(s) collection and item don't seem to be recognized by
Outlook, although Access knows them...

Marc




  #5  
Old October 18th 06, 02:14 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,426
Default CommandBars collection in Outlook

Show the code you're using.

There are lots of CommandBar coding samples at www.outlookcode.com that you
can review.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"mml" wrote in message
...
Thank you for your help.
But now, by code, I try to link the new button with lines of code on the
"on
click" event, but I don't succeed .
Can you help me ?

Best regards.


  #6  
Old October 20th 06, 04:17 PM posted to microsoft.public.outlook.program_vba
mml
external usenet poster
 
Posts: 5
Default CommandBars collection in Outlook

Hi,

Thanks a lot for your good messages. I think I'm near the happiness.

The ".OnAction" of my button must call an executable file (.exe) and I dont
find the right syntax for that.
Can you help me ?

Best regards.
MML

"Sue Mosher [MVP-Outlook]" a écrit dans le message
de ...
Did you look at the Items Command Bar sample from that page? It's a great
COM add-in example of adding a toolbar button.

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

"mml" wrote in message
...
Thank you for your help.
But now, by code, I try to link the new button with lines of code on the

"on
click" event, but I don't succeed .
Can you help me ?

Best regards.



"Sue Mosher [MVP-Outlook]" a écrit dans le

message
de ...
If you look in the object browser, you'll see that in Outlook, CommandBars
is a child object of the Inspector and Explorer window objects, not the
Application object. See

http://www.outlookcode.com/d/tips/commandbarfun.htm

"mml" wrote in message
...

Hi,

Does anybody know how to add a CommandBar Button in Outlook 2000 by code

?

The CommandBar(s) collection and item don't seem to be recognized by
Outlook, although Access knows them...

Marc






  #7  
Old October 20th 06, 04:32 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,605
Default CommandBars collection in Outlook

OnAction is the wrong property if you want to run an .exe. Use OnAction to run a VBA macro or to associate the button with a COM add-in.

To run an .exe, set the CommandBarButton.HyperlinkType property to msoCommandBarButtonHyperlinkOpen [= 1] and put the path to the .exe file in the TooltipText property.

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

"mml" wrote in message ...

The ".OnAction" of my button must call an executable file (.exe) and I dont
find the right syntax for that.



  #8  
Old October 20th 06, 07:25 PM posted to microsoft.public.outlook.program_vba
mml
external usenet poster
 
Posts: 5
Default CommandBars collection in Outlook

YES, It works fine !!!!!

Thanks a lot !



"Sue Mosher [MVP-Outlook]" a écrit dans le message
de ...
OnAction is the wrong property if you want to run an .exe. Use OnAction to
run a VBA macro or to associate the button with a COM add-in.

To run an .exe, set the CommandBarButton.HyperlinkType property to
msoCommandBarButtonHyperlinkOpen [= 1] and put the path to the .exe file in
the TooltipText property.

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

"mml" wrote in message
...

The ".OnAction" of my button must call an executable file (.exe) and I

dont
find the right syntax for that.




 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with email collection in Outlook 2003 Trent SC Outlook - General Queries 2 September 26th 06 09:11 PM
Outlook commandbars once more Marcin Junger Add-ins for Outlook 1 September 12th 06 06:18 PM
Outlook commandbars Radiohead Add-ins for Outlook 1 January 25th 06 02:35 PM
how to use the CommandBars Collection Jim B Outlook - Using Forms 0 January 22nd 06 12:46 AM
commandbarcontrols collection working with Outlook 11 Tim Bolton Outlook and VBA 0 January 12th 06 09:07 PM


All times are GMT +1. The time now is 06:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Remortgages - MySpace Backgrounds - Webbdesign - Pay Day Loans - Credit Cards