New Toolbar
So, that really didn't fix it.
I created a toolbar called "myOLAddOns". I want it to only be
enabled/visible/present on the new appointment form. I am new to outlook
programming (as you will see) but this is what I have so far and it is not
working. Any suggestions would be greatly appreciated.
I have added this code to "this outlook session", thinking it would be
triggered anytime I opened a "new" form.
Dim objApp As Application
Dim objIns As Outlook.Inspector
Dim objItem As Object
Dim objCB As Office.commandbars
Dim objCBB As CommandBarControl
Set objApp = CreateObject("Outlook.Application")
Set objIns = objApp.ActiveInspector
Set objItem = objApp.ActiveInspector.CurrentItem
Set objCB = objIns.commandbars
Set objCBB = objCB.item("myOlAddOns").Controls.item("Post to Personal
and Team Lead Calendars")
If objIns.Class = olAppointment Then
objCBB.Enabled = True
Else
objCBB.Enabled = False
End If
--
Teach me to fish! Thanks for the help.
Pax, M
"m stroup" wrote:
I figured it out. I just removed it from all forms and reset it on the
appointment form.
--
Teach me to fish! Thanks for the help.
Pax, M
"m stroup" wrote:
I have code attached to a button on a new toolbar. I added the toolbar to
the new appointment form which is correct. But now I see the toolbar on the
new email, new task etc. forms. It is only appropriate on the new
appointment form.
Any suggestions?
--
Teach me to fish! Thanks for the help.
Pax, M
|