Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Dec 2001
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Toolbar in Outlook w/ VB (VB6/Outlook 2002)

    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)

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Toolbar in Outlook w/ VB (VB6/Outlook 2002)

    I think the problem is that you don't have an ActiveInspector because you haven't created or opened any mail messages. If I start Outlook and create a blank mail message then your macro runs fine (After I replaced ol. with golApp.)

    StuartR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •