![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I have been tasked with updating one of our legacy add-ins for Outlook. And
by "legacy", I mean that it was written entirely in VB6, with no immediate plans to rewrite/update to .NET. Currently the add-in (among other things) adds a custom menu to the Insert menu when drafting an e-mail message. I have been tasked with adding the same custom menu to the Insert Menu when drafting a Meeting Request or Appointment. The code I have for initially setting up the Message Insert menu is as follows: Dim NewInsertMenu As CommandBarPopup Dim NewRefPopUp As CommandBarPopup Set NewInsertMenu = colCB.FindControl(id:="30005") Set PMCRefPopUp = NewInsertMenu NewRefPopUp.Caption = "NewInsertSubMenu" NewRefPopUp.BeginGroup = True NewRefPopUp.Tag = "NewInsertSubMenu" Unfortunately, I'm at a loss to figure out how to add that same menu to the Appointments Insert menu. Any ideas/suggestions? I was hoping it'd just be a different Control ID (to replace the 30005 in the code above), but I'm simply not finding it online or otherwise. Thanks! |
#2
|
|||
|
|||
![]()
Are PMCRefPopUp and colCB declared somewhere?
Using this quickie VBA snippet I got the Insert menu from an open appointment item that was ActiveInspector: Dim NewInsertMenu As CommandBarPopup Set NewInsertMenu = _ Application.ActiveInspector.CommandBars("Menu Bar").FindControl(ID:="30005") -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Scott Lyon" wrote in message ... I have been tasked with updating one of our legacy add-ins for Outlook. And by "legacy", I mean that it was written entirely in VB6, with no immediate plans to rewrite/update to .NET. Currently the add-in (among other things) adds a custom menu to the Insert menu when drafting an e-mail message. I have been tasked with adding the same custom menu to the Insert Menu when drafting a Meeting Request or Appointment. The code I have for initially setting up the Message Insert menu is as follows: Dim NewInsertMenu As CommandBarPopup Dim NewRefPopUp As CommandBarPopup Set NewInsertMenu = colCB.FindControl(id:="30005") Set PMCRefPopUp = NewInsertMenu NewRefPopUp.Caption = "NewInsertSubMenu" NewRefPopUp.BeginGroup = True NewRefPopUp.Tag = "NewInsertSubMenu" Unfortunately, I'm at a loss to figure out how to add that same menu to the Appointments Insert menu. Any ideas/suggestions? I was hoping it'd just be a different Control ID (to replace the 30005 in the code above), but I'm simply not finding it online or otherwise. Thanks! |
#3
|
|||
|
|||
![]()
Sorry about that. That's what I get for trying to clip out code before
posting - mistakes and cutting too much. Here's a better representation of the code: Dim NewInsertMenu As CommandBarPopup Dim NewRefPopUp As CommandBarPopup Dim colCB As Office.CommandBars Public WithEvents myItems As Inspectors Private Sub myItems_NewInspector(ByVal Inspector As outlook.Inspector) Set colCB = Inspector.CommandBars Set NewInsertMenu = colCB.FindControl(id:="30005") Set NewRefPopUp.Caption = NewInsertMenu NewRefPopUp.Caption = "NewInsertSubMenu" NewRefPopUp.BeginGroup = True NewRefPopUp.Tag = "NewInsertSubMenu" ' the rest of the code for the sub-menu here End Sub The thing that's strange, is while this adds the new sub-menu to the Insert menu when editing an E-mail message, it does not add a new sub-menu to the Insert menu when editing an Appointment. -Scott "Ken Slovak - [MVP - Outlook]" wrote: Are PMCRefPopUp and colCB declared somewhere? Using this quickie VBA snippet I got the Insert menu from an open appointment item that was ActiveInspector: Dim NewInsertMenu As CommandBarPopup Set NewInsertMenu = _ Application.ActiveInspector.CommandBars("Menu Bar").FindControl(ID:="30005") -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Scott Lyon" wrote in message ... I have been tasked with updating one of our legacy add-ins for Outlook. And by "legacy", I mean that it was written entirely in VB6, with no immediate plans to rewrite/update to .NET. Currently the add-in (among other things) adds a custom menu to the Insert menu when drafting an e-mail message. I have been tasked with adding the same custom menu to the Insert Menu when drafting a Meeting Request or Appointment. The code I have for initially setting up the Message Insert menu is as follows: Dim NewInsertMenu As CommandBarPopup Dim NewRefPopUp As CommandBarPopup Set NewInsertMenu = colCB.FindControl(id:="30005") Set PMCRefPopUp = NewInsertMenu NewRefPopUp.Caption = "NewInsertSubMenu" NewRefPopUp.BeginGroup = True NewRefPopUp.Tag = "NewInsertSubMenu" Unfortunately, I'm at a loss to figure out how to add that same menu to the Appointments Insert menu. Any ideas/suggestions? I was hoping it'd just be a different Control ID (to replace the 30005 in the code above), but I'm simply not finding it online or otherwise. Thanks! |
#4
|
|||
|
|||
![]()
Are you getting a handle to the Insert menu? It should work for any item
type except for notes (IPM.StickyNote), those are brain dead. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Scott Lyon" wrote in message ... Sorry about that. That's what I get for trying to clip out code before posting - mistakes and cutting too much. Here's a better representation of the code: Dim NewInsertMenu As CommandBarPopup Dim NewRefPopUp As CommandBarPopup Dim colCB As Office.CommandBars Public WithEvents myItems As Inspectors Private Sub myItems_NewInspector(ByVal Inspector As outlook.Inspector) Set colCB = Inspector.CommandBars Set NewInsertMenu = colCB.FindControl(id:="30005") Set NewRefPopUp.Caption = NewInsertMenu NewRefPopUp.Caption = "NewInsertSubMenu" NewRefPopUp.BeginGroup = True NewRefPopUp.Tag = "NewInsertSubMenu" ' the rest of the code for the sub-menu here End Sub The thing that's strange, is while this adds the new sub-menu to the Insert menu when editing an E-mail message, it does not add a new sub-menu to the Insert menu when editing an Appointment. -Scott |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Novice: Adding a menu to current menu? | Peter | Add-ins for Outlook | 4 | October 2nd 06 04:34 PM |
Scanner not in Insert menu | tk | Outlook - General Queries | 2 | July 27th 06 02:27 PM |
Do not have "Insert Item" on Paperclip or Insert menu in e-mail | Ioparto | Outlook - General Queries | 7 | June 29th 06 09:52 PM |
adding a context menu in Outlook | donald | Add-ins for Outlook | 6 | May 3rd 06 02:49 PM |
Adding Outlook Express to my start menu | MP Boettger | Outlook - General Queries | 1 | February 22nd 06 06:45 PM |