Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add menu item to Outlook

Status
Not open for further replies.

Corbie

Technical User
Nov 19, 2001
21
GB
Hi

I'm trying to add a menu item to the toolbars in MS Outlook
with following Code:

Sub testbar()
Dim customBar As CommandBar
Dim newButton As CommandBarPopup

Set customBar = CommandBars.FindControl(ID:="Tools") ***

Set newButton = customBar.Controls _
.Add(msoControlButton)
With newButton
.Caption = "&Save Attachment"
.OnAction = "Save_Attachments"
.BeginGroup = True
End With
End Sub

but keep getting run time error 424/object required
on line marked with ***

Not too good with VBA so could easily be making silly
mistake - could somebody please help

Thanks

Paul

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top