none
How to prohibit creating an item of a specific message class in Outlook RRS feed

  • Question

  • Hi every one,

    I have created a new message class in Outlook and a form region that goes with it.

    Messages of this class can be created based on a specific business logic that my add-in implements.

    I want to make sure that the user cannot create a new message of this type by going to

    Office 2007: Actions menu, and selecting New <name of the form region>

    Office 2010: (something similar with 2013? don't have access to it right now)

    Office 2013: (when in mail folder)HOME ribbon, New Items button, Custom forms--><name of the form region>

    Is there a way to register the form region as non-creatable from the Outlook UI, or something along these lines?

    I only want to create such message classes by code.

    Thank you in advance,

    Jason Orphanidis


    Jason Orphanidis

    Thursday, May 30, 2013 11:00 AM

Answers

  • There is no such built-in setup for Outlook, you'd have to implement your own. Here's one possibility. Handle Explorers.BeforeFolderSwitch(). When that fires set up a handler for ItemAdd() to the Items collection of the newly selected folder. Do that initially on ActiveExplorer().CurrentFolder.
     
    When the event fires change the MessageClass to the default instead of the custom MessageClass.
     
    Additionally, you can repurpose the relevant ribbon controls and set the Enabled property for those controls to false so the user can't use them. See http://msdn.microsoft.com/en-us/library/office/bb462633(v=office.12).aspx and similar articles for information on repurposing ribbon controls.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Jason Orphanidis" <=?utf-8?B?SmFzb24gT3JwaGFuaWRpcw==?=> wrote in message news:635fbd32-6e4d-42ad-b9ea-46fecdc3b135...

    Hi every one,

    I have created a new message class in Outlook and a form region that goes with it.

    Messages of this class can be created based on a specific business logic that my add-in implements.

    I want to make sure that the user cannot create a new message of this type by going to

    Office 2007: Actions menu, and selecting New <name of the form region>

    Office 2010: (something similar with 2013? don't have access to it right now)

    Office 2013: (when in mail folder)HOME ribbon, New Items button, Custom forms--><name of the form region>

    Is there a way to register the form region as non-creatable from the Outlook UI, or something along these lines?

    I only want to create such message classes by code.

    Thank you in advance,

    Jason Orphanidis


    Jason Orphanidis


    Ken Slovak MVP - Outlook
    Friday, May 31, 2013 7:08 PM

All replies

  • Hi Jason,

    Thank you for posting in the MSDN Forum.

    I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.

    Sorry for any inconvenience and have a nice day!

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 31, 2013 8:11 AM
    Moderator
  • There is no such built-in setup for Outlook, you'd have to implement your own. Here's one possibility. Handle Explorers.BeforeFolderSwitch(). When that fires set up a handler for ItemAdd() to the Items collection of the newly selected folder. Do that initially on ActiveExplorer().CurrentFolder.
     
    When the event fires change the MessageClass to the default instead of the custom MessageClass.
     
    Additionally, you can repurpose the relevant ribbon controls and set the Enabled property for those controls to false so the user can't use them. See http://msdn.microsoft.com/en-us/library/office/bb462633(v=office.12).aspx and similar articles for information on repurposing ribbon controls.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Jason Orphanidis" <=?utf-8?B?SmFzb24gT3JwaGFuaWRpcw==?=> wrote in message news:635fbd32-6e4d-42ad-b9ea-46fecdc3b135...

    Hi every one,

    I have created a new message class in Outlook and a form region that goes with it.

    Messages of this class can be created based on a specific business logic that my add-in implements.

    I want to make sure that the user cannot create a new message of this type by going to

    Office 2007: Actions menu, and selecting New <name of the form region>

    Office 2010: (something similar with 2013? don't have access to it right now)

    Office 2013: (when in mail folder)HOME ribbon, New Items button, Custom forms--><name of the form region>

    Is there a way to register the form region as non-creatable from the Outlook UI, or something along these lines?

    I only want to create such message classes by code.

    Thank you in advance,

    Jason Orphanidis


    Jason Orphanidis


    Ken Slovak MVP - Outlook
    Friday, May 31, 2013 7:08 PM
  • Thank you Ken for your directions!


    Jason Orphanidis

    Tuesday, June 4, 2013 8:10 AM