A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags:

New Toolbar





 
 
Thread Tools Display Modes
  #1  
Old May 14th 08, 04:21 PM posted to microsoft.public.outlook.program_forms
m stroup
external usenet poster
 
Posts: 6
Default New Toolbar

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
Ads
  #2  
Old May 14th 08, 10:16 PM posted to microsoft.public.outlook.program_forms
m stroup
external usenet poster
 
Posts: 6
Default New Toolbar

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

  #3  
Old May 15th 08, 05:38 PM posted to microsoft.public.outlook.program_forms
m stroup
external usenet poster
 
Posts: 6
Default 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

  #4  
Old May 27th 08, 01:58 AM posted to microsoft.public.outlook.program_forms
Guest
 
Posts: n/a
Default New Toolbar

You need to monitor the NewInspector event for a Inspectors collection
declared using WithEvents at the module level. You would get the Inspectors
collection from the Application.Inspectors object during Application_Startup
in ThisOutlookSession. Then simply don't process any Inspectors in the
NewInspector event if it doesn't meet your criteria.

It's also best to implement an Inspector wrapper, so that your custom
toolbars/buttons will work if multiple items are opened (and you won't be
subject to the "last inspector wins" scenario).

For some great sample code that shows best practices with Inspectors and
custom toolbars, see the COM Add-In projects he
http://www.slovaktech.com/code_samples.htm

--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
Collaborative Innovations
- Try Picture Attachments Wizard For Microsoft Outlook -
Web: http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault


"m stroup" wrote in message
...
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No Toolbar James Outlook Express 7 February 26th 07 09:02 PM
TOOLBAR PROBLEM its_my_dime Outlook - General Queries 0 December 26th 06 10:09 PM
Toolbar Nick G Outlook Express 2 December 19th 06 04:15 AM
Toolbar problem Lesley Outlook Express 7 August 30th 06 11:19 AM
IE Toolbar Nee Outlook Express 2 April 1st 06 04:10 PM


All times are GMT +1. The time now is 11:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Credit Cards - Kung fu for a healthy you - Bad Credit Mortgages - Debt Help - Fast Loans