none
Using Inspector.HideFormPage to hide a built-in page in Outlook international versions RRS feed

  • Question

  • Hi,

    I'm using Inspector.HideFormPage to hide a built-in page of an Outlook.TaskItem, specifically the Details page.
    (Inspector.HideFormPage("Details"), is the call I make).

    I do this inside Item_Open and it works fine.

    However, this only works in the English version of Office.

    When my addin is loaded from a non English Outlook, the page cannot be hidden, because the page has another name.

    After reading the HideFormPage documentation in MSDN, it states that the parameter for HideFormPage is

    "The display name of the form page, or the internal name of a form region to be hidden"

    How can I get the form region's InternalName property value of the built-in page?

    Alternatively, how can I get the display name of the current Office version?

    Any ideas ?

    Thanks,

    Jason


    Jason Orphanidis


    Friday, January 10, 2014 11:20 AM

Answers

  • Hi Jason,

    You need to store the name for all supported languages.

    As a rule, the internal programmatic name of the form region is defined in the manifest for the form region. The <name> tag in the corresponding form region manifest XML file maps to the value of the InternalName property. Only the add-in that implements the form region can hide the form region.

    Friday, January 10, 2014 12:49 PM

All replies

  • Hi Jason,

    You need to store the name for all supported languages.

    As a rule, the internal programmatic name of the form region is defined in the manifest for the form region. The <name> tag in the corresponding form region manifest XML file maps to the value of the InternalName property. Only the add-in that implements the form region can hide the form region.

    Friday, January 10, 2014 12:49 PM
  • Hi Eugene,

    So you are sure I have no access to the form region manifest XML of the built-in forms?

    Thanks,

    Jason


    Jason Orphanidis

    Friday, January 10, 2014 1:06 PM
  • Yes, I am.

    For each supported language by your add-in, you need to store the localized name.

    Friday, January 10, 2014 1:59 PM
  • Built-in forms or tabs such as Details or General don't use form region manifests, so there's no such possibility.

    Something that might work for you is to get the Inspector.ModifiedFormPages collection and iterate it to get each specific Page. Each Page can be cast as an MSForms.Page object, you can then get the Name property for each Page.

    If you know the index value of the Page you want that can work. If not you need to do what Eugene suggested and store the names for each supported language.


    Ken Slovak MVP - Outlook

    Friday, January 10, 2014 4:42 PM
  • Nice try with the ModifiedformPages Ken, but unfortunatelly it doesn't work.

    At first the collection is empty. If I call ModifiedformPages.Add("dummy") it suddenly gets populated with 3 members (which is correct as my addin implements two custom form regions (one replaces the default)), but their names are irrelevant... I couldn't cast them to MSForms.Page as you said. I declared them dynamic and got the Name property anyway.

    The names I got were "MyRegion", "dummy" and "(Form Region)". Only the 1st relates to reality. the 2nd should be "Details" (which is the one I want to hide) and the 3rd should be the name of the other custom region "MyOtherRegion".

    Finally, feeding them to Inspector.HideFormPage didn't do anything for any of them.

    So I guess I'll have to go with Eugene's suggestion...

    Thanks to you both !

    Jason


    Jason Orphanidis

    Friday, January 10, 2014 7:00 PM