S
Sarah S
This is my first attemt w/ Outlook and I am using the
provided sample and the book "Microsoft Outlook
Programming. I have been using the sample project ItemsCB
as a base for creating my application. I added a command
bar button to the MailItem Standard toolbar using this
code:
Set cb = Inspector.CommandBars.Item("Standard")
When that button is clicked, I want to launch a VB 6 form
I designed. I created my Inspector wrapper class
following the ExplWrap class. I instantiate my inspector
object as follows and use WithEvents:
Public Property Let Inspector(objInsp As Outlook.Inspector)
On Error Resume Next
Set m_objInsp = objInsp
Set m_MailItem = objInsp.CurrentItem
Set m_colInsps = Outlook.Inspectors
End Property
When a m_colInsps_NewInspector is fired, I see if I need
to add my button. Things seem to go well up to this
point, but when I click on my button to launch my own
form, I get an error when I try and show the form
using .Show vbModal, Me.
I get error 371 which is:
The specified object can't be used as an owner form for
Show() (Error 371)
You must use an appropriate object with the Show method.
Can I not use my own VB form? Do I have to make it am
Outlook Custom Designed form?
provided sample and the book "Microsoft Outlook
Programming. I have been using the sample project ItemsCB
as a base for creating my application. I added a command
bar button to the MailItem Standard toolbar using this
code:
Set cb = Inspector.CommandBars.Item("Standard")
When that button is clicked, I want to launch a VB 6 form
I designed. I created my Inspector wrapper class
following the ExplWrap class. I instantiate my inspector
object as follows and use WithEvents:
Public Property Let Inspector(objInsp As Outlook.Inspector)
On Error Resume Next
Set m_objInsp = objInsp
Set m_MailItem = objInsp.CurrentItem
Set m_colInsps = Outlook.Inspectors
End Property
When a m_colInsps_NewInspector is fired, I see if I need
to add my button. Things seem to go well up to this
point, but when I click on my button to launch my own
form, I get an error when I try and show the form
using .Show vbModal, Me.
I get error 371 which is:
The specified object can't be used as an owner form for
Show() (Error 371)
You must use an appropriate object with the Show method.
Can I not use my own VB form? Do I have to make it am
Outlook Custom Designed form?