![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi, I have below code in my Outlook VBA code which creates tool bar and
button. I also want to create the TextBox and when user enter something into TextBox and press Enter, it should show message. Could any one tell me how could I do it? Private Sub CreateToolBar() Const TOOLBARNAME = "MyToolbar" Dim ofcBar As Office.CommandBar On Error Resume Next 'Test to see if the toolbar already exists' Set ofcBar = Outlook.Application.ActiveExplorer.CommandBars(TOO LBARNAME) On Error GoTo 0 If TypeName(ofcBar) = "Nothing" Then 'Create the toolbar' Set ofcBar = Outlook.Application.ActiveExplorer.CommandBars.Add (TOOLBARNAME, msoBarTop, False, True) Set DESDialButton = MyToolbarApp.ActiveExplorer.CommandBars.Item("MyTo olbar").FindControl(, , "891", False, True) If TypeName(DESDialButton) = "Nothing" Then Set DESDialButton = MyToolbarApp.ActiveExplorer.CommandBars.Item("MyTo olbar").Controls.Add(msoControlButton, , "891", , True) End If With DESDialButton .BeginGroup = True .Caption = "MyButton" .Enabled = True .OnAction = "!DESDialAddin.Connect" .FaceId = 275 .Style = 3 .Tag = "891" .Visible = True End With End If ofcBar.Visible = True Set ofcBar = Nothing End Sub |
Ads |
#2
|
|||
|
|||
![]()
You can't. There is no textbox control for command bars. As close as you'd
get is a dropdown control and that's something quite different. -- 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 "paresh" wrote in message ... Hi, I have below code in my Outlook VBA code which creates tool bar and button. I also want to create the TextBox and when user enter something into TextBox and press Enter, it should show message. Could any one tell me how could I do it? Private Sub CreateToolBar() Const TOOLBARNAME = "MyToolbar" Dim ofcBar As Office.CommandBar On Error Resume Next 'Test to see if the toolbar already exists' Set ofcBar = Outlook.Application.ActiveExplorer.CommandBars(TOO LBARNAME) On Error GoTo 0 If TypeName(ofcBar) = "Nothing" Then 'Create the toolbar' Set ofcBar = Outlook.Application.ActiveExplorer.CommandBars.Add (TOOLBARNAME, msoBarTop, False, True) Set DESDialButton = MyToolbarApp.ActiveExplorer.CommandBars.Item("MyTo olbar").FindControl(, , "891", False, True) If TypeName(DESDialButton) = "Nothing" Then Set DESDialButton = MyToolbarApp.ActiveExplorer.CommandBars.Item("MyTo olbar").Controls.Add(msoControlButton, , "891", , True) End If With DESDialButton .BeginGroup = True .Caption = "MyButton" .Enabled = True .OnAction = "!DESDialAddin.Connect" .FaceId = 275 .Style = 3 .Tag = "891" .Visible = True End With End If ofcBar.Visible = True Set ofcBar = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cant add a textbox to Outlook 2003 Main toolbar | metramo | Outlook - General Queries | 0 | March 29th 08 09:01 AM |
Need help to create a toolbar for outlook 2007 C# | Al | Add-ins for Outlook | 1 | February 13th 08 04:50 PM |
create a Toolbar button for Calendar in Outlook 2003 | Dan | Outlook and VBA | 1 | November 23rd 07 07:44 PM |
create shortcut to folder in outlook toolbar | [email protected] | Outlook - General Queries | 1 | February 15th 06 04:16 PM |
create shortcut to folder in outlook toolbar | [email protected] | Outlook - General Queries | 0 | February 14th 06 09:10 PM |