Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, August 27, 2010 1:28 AM
Hi,
Not sure if this is the appropriate forum because it's not really a developer question, but hopefully someone can help.
We want to create some custom message forms (for example, a form for passing on phone message details via email), but we want to be able to open this form directly from a group in the ribbon. By default, the process involves selecting New Items->More Items->Choose Item which then opens up the choose form dialog. The user then has to browse for the desired form. It's a lengthy process that defeats the purpose of the custom form in the first place.
What we'd like to do is create a group on the ribbon that contains buttons which open these forms directly, just like you can do for a new standard E-mail or a new contact.
Any advice on how we can achieve this same direct open approach for custom forms would be appreciated.
If this is not the appropriate forum, can someone please direct me to the appropriate forum.
All replies (15)
Friday, August 27, 2010 5:34 AM âś…Answered | 2 votes
Assuming you talk about OL2010:
First, you need to create a macro that opens the form. For instance:
Public Sub AddMyForm()
Dim Items as Outlook.Items
Dim Item as Object
Set Items=Application.ActiveExplorer.CurrentFolder.Items
Set Item=Items.Add("ipm.note.any_name")
Item.Display
End Sub
Then right click the ribbon, choose Customize the Ribbon, click New Tab, rename the tab and the group if you like, then select Macros from the Choose commands from listbox. Select a macro name and drag it into your custom goup.
Michael Bauer - MVP Outlook
Category Manager - Easily share your categories
Friday, August 27, 2010 5:39 AM
Thanks Michael. I'll give that a go.
Tuesday, November 23, 2010 6:55 PM
Michael,
Thanks...This worked for me.
Wednesday, January 5, 2011 6:51 PM
Hello Michael,
I am also trying to do this. But for whatever reason it is not working. I am in OL2010. Is there another way to create a macro without going into the registry. I am just a little lost I think.
I am on my work pc and I love using my old outlook phone message email form. I just want to add it to the ribbon for instant access but I am having trouble.
Thank you.
Saturday, January 22, 2011 10:00 PM
Worked like a charm, and I am a novice!
Monday, September 26, 2011 2:59 PM
Thanks Michael it worked for me.
But how can i add a form that it is in a Public Folder?
Wednesday, October 26, 2011 5:31 PM
Thanks Michael it worked for me.
But how can i add a form that it is in a Public Folder?
I too would like to do this for a Form that is in a Public Folder.
Anyone give a tip?
Wednesday, March 21, 2012 8:18 PM
I would like to do the above but don't really know much if anything about macros! Is there a quick way you could tell me how to do this please?
Thank you!
Friday, April 25, 2014 1:14 PM
Could somebody elaborate on the line "Set Item=Items.Add("ipm.note.any_name")"? I have a customized 'Meeting' form titled "TestForm" (located in the 'Personal Forms Library'), but cannot get it to open.
I've tried the following unsuccessfully:
Set Item=Items.Add("ipm.note.TestForm")
Set Item=Items.Add("TestForm")
Thx,
Al
Friday, April 25, 2014 1:27 PM
Hello,
First of all, I'd recommend creating new threads instead of blowing up old ones that were marked as answered. Thus, forum readers may recognize questions and answers quickly.
You need to create an item of the message class associated with your custom form. Then you can call the Display method to get the form (an inspector window) opened.
Friday, April 25, 2014 1:30 PM
See the Microsoft Outlook Custom Forms page for more information. Also you may find the Frequently asked questions about custom forms and Outlook solutions helpful.
Friday, April 25, 2014 2:19 PM
IPM.Note.* is for mail items. For an appointment item you'd use "IPM.Appointment.TestForm". That should work for a published form.
Ken Slovak MVP - Outlook
Friday, April 25, 2014 2:20 PM
Also, make sure that the Items collection where the appointment is being added is an Items collection in a calendar folder.
Ken Slovak MVP - Outlook
Friday, April 25, 2014 5:44 PM
Ken - This worked well. Thank you!
I don't understand your 2nd posting, however, regarding adding it to an "items collection in a calendar folder". Below is my working code, which I've attached to a button on the Quick Access Toolbar . I was expecting that the 'CurrentFolder' would be the active screen that I'm on (either Mail, Calendar, Contacts or Tasks), and that this .Display command might fail if I wasn't on my "Calendar" page, however it successfully opens my TestForm from the 'Personal Forms Library', regardless of which page is active (no complaints on this!):
Set Items = Application.ActiveExplorer.CurrentFolder.Items
Set Item = Items.Add("ipm.appointment.TestForm")
Item.Display
Thx,
Al
Friday, April 25, 2014 5:55 PM
You can add appointment items to a calendar folder or an Inbox folder. It doesn't work so well if you try to add an appointment to a tasks or contacts folder, and the new item won't be shown in your calendar.
I'd use something like this in Outlook VBA to add the item to the calendar:
Set Items = Application.Session.GetDefaultFolder(olFolderCalendar).Items
the rest of the code can remain the same. That will add the item to your default calendar folder.
Ken Slovak MVP - Outlook