A
amiga1200
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
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