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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a Toolbar in Outlook w/ VB

Status
Not open for further replies.

rpthomas

Programmer
Feb 2, 2002
7
US
I'm trying to create a Outlook Toolbar using VB, but keep getting the error, "Object Variable Not Set”.

Dim golApp As Outlook.Application
Dim DPNewMenu As CommandBar
Set golApp = GetObject(, "Outlook.Application")

Set DPNewMenu = ol.ActiveInspector.CommandBars.Add _
(Name:="Test Menu", Temporary:=True)

What am I missing?

Thanks
Roland
 
Should it be:

Set DPNewMenu = golApp.ActiveInspector.CommandBars.Add _
(Name:="Test Menu", Temporary:=True)

If you force variable declaration with Option Explicit then ol.ActiveInspector would have raised a compile error.

Paul Bent
Northwind IT System
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top