D
dushkin
Hi All,
I wish to press a button in an Office 2007 commandbar.
I use vb script.
This is what I wrote this far:
----------------------------------------------------------------------------------
Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set myOlExp = objOutlook.ActiveExplorer
Set myCmdBars = myOlExp.CommandBars
Set standardBar = myCmdBars.Item("Standard") ' Standard is the name of
the CommandBar
For Each ctl In standardBar.Controls
If ctl.Caption = "My Button" Then
' I want to press this toolbar button here!
End If
Next
Wscript.Echo "done"
I wish to press a button in an Office 2007 commandbar.
I use vb script.
This is what I wrote this far:
----------------------------------------------------------------------------------
Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set myOlExp = objOutlook.ActiveExplorer
Set myCmdBars = myOlExp.CommandBars
Set standardBar = myCmdBars.Item("Standard") ' Standard is the name of
the CommandBar
For Each ctl In standardBar.Controls
If ctl.Caption = "My Button" Then
' I want to press this toolbar button here!
End If
Next
Wscript.Echo "done"