Problems accessing Outlook from Access

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top