![]() |
| 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. |
|
|||||||
| Tags: collection, commandbars, outlook |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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 | |
|
|
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 |