Problems accessing Outlook from Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code

Dim ObjOutlook As Outlook.Application
Dim ObjCtl As Office.CommandBarControl
Dim ObjPop As Office.CommandBarPopup
Dim ObjCB As Office.CommandBar
Dim ObjItem As Object

Set ObjOutlook = CreateObject("Outlook.Application")
Set ObjCB = ObjOutlook.ActiveInspector.CommandBars("Standard")
Set ObjPop = myMenu.Controls("Insert")
Set ObjPop = ObjPop.Controls("Signature")
ObjPop.Reset
Set ObjCtl = ObjPop.Controls.Item("Deliveries")
ObjCtl.Execute

But I keep getting errors in the line starting Set ObjCB I get the following
error.

Run-time error '91':
Object variable or With block variable not set

Help please
Amiga1200
 
Back
Top