Print | Rate this content

Microsoft SharePoint Server 2010 - XLTM Template File Displays Document Information Panel

Issue

Symptoms:

Users store .xltm (or other macro enabled Excel files) in a SharePoint 2010 library. Go into Excel, and uncheck option Always show Document Information Panel on document open and initial save. User should confirm the settings and close the file and then upload the file to the library. When the user downloads a copy of the file from this library, the document properties panel is still displayed, although the initial checkbox remain unchecked.

Solution

Cause:

This is an expected behavior, since Always show Document Information Panel on document open and initial save for this content type is not a Yes/No option. Furthermore, users have been able to reproduce the problem on the machine with macro enabled Office templates, if local copies are made of the documents in question. Also, having the escalation team check the code behind the involved applications, it can be confirmed that the default behavior is the following:

The OpenByDefault setting in the OpenXML file is read when users either have a custom xml part or if a custom DIP on a document library is being used.

For example, if a document information panel template in InfoPath is opened and publish it to a document library, when downloading documents user will indeed automatically have a reference to the custom DIP setting. It includes an OpenByDefault setting of False by default so when opening this document locally it normally will not show the DIP any more.

For testing purposes, changed this setting to True.

  • Now the DIP is always displayed when opening the local file.

  • So this setting does indeed make a difference. Therefore user can implement it in a workaround that can develop by the users or ask for support from the Microsoft Consulting Services.

In order to find and modify this option, need to publish a custom DIP template (xsn) to the document library first as mentioned above. Then will be able to locate the OpenByDefault option in the customxml\Item5.xml file in the file .zip structure.

Regarding the observation about templates and documents:

If a template is opened locally (e.g. a dotm) then there is the same behavior as with normal files (e.g. docm). So this is consistent.

If a locally downloaded template is double-clicked then Word (or other Office apps) will not open the template. It will create a new document based on this template. This code path is completely different.

If Word finds a WSS property reference in the template then it automatically opens the DIP when creating new documents.

Resolution:

  1. In Workbook_Open hide DIP after a delay:

    In Workbook_Open() for ThisWorkbook:

    private sub document_new()
    Application.OnTime Now + TimeValue("00:00:01"), "On_Doc_Open"
    end sub

    In Module (Module 1 or Main) add a public function namens On_Doc_Open :


    Public Sub On_Doc_Open() ActiveWorkbook.Application.DisplayDocumentInformationPanel = False
    end Sub

  2. Create a button to close the panel:

    Click here to access the document "Manage Metadata with Document Information Panels" Non-HP site .

  3. Use Selection Change to hide DIP auf FALSE ( Similar to workaround 1 ): ThisWorkbook


    select SheetSelectionChange Application.DisplayDocInfoPanel = False

  4. For templates one could think about setting the OpenByDefault property in the OOXML stream to False. In order to find and modify this option, user need to publish a custom DIP template (xsn) to the document library first as mentioned above. Then user will be able to locate the OpenByDefault option in the customxml\Item5.xml file in the file .zip structure:

    <?mso-contentType?>
    <customXsn xmlns="http://schemas.microsoft.com/office/2006/metadata/customXsn"> <xsnLocation></xsnLocation>
    <cached>True</cached>
    <openByDefault>True</openByDefault>
    <xsnScope></xsnScope>
    </customXsn>

    If the OpenByDefault is changed to False, then the DIP is not displayed when the document is opened.

    This can be done outside of the Office applications with an external application, but user need to investigate how it would be implemented as there could be performance issues etc.

  5. Alternatively, user could avoid template file formats in document libraries and store documents instead of templates there.

  6. User may find the following public documentation useful:

    Click here to access the document "Updating Document Information Panels for Content Type Changes in SharePoint Server 2007" Non-HP site .

Disclaimer

NOTE: One or more of the links above will take you outside the Hewlett-Packard Web site, HP does not control and is not responsible for information outside of the HP Web site.

Provide feedback

Please rate the information on this page to help us improve our content. Thank you!