Is it possible to embed a Document Information Panel file (.xsn) in Word for distribution? RRS feed

  • Question

  • I'm designing templates using content controls and CustomXMLParts. Works like a charm, but I'd like to take it a step further. I would like to use a Document Information Panel (DIP) to edit the information in the CustomXML. Got that working too. However, it should be possible to use the templates without being connected to the network and/or Sharepoint.

    My question is: is it possible to embed an DIP in the Word document?

    My procedure:

    • Step 1: designed a XML to store all your information.
    • Step 2: add this XML as a customXMLPart (e.g. using macros: activeDocument.CustomXMLParts.Add(xmlString))
    • Step 3: insert some content controls in your word document
    • Step 4: map the content control to your customXML part using XPath expressions. (e.g.
    • step 5: create the DIP in InfoPath using the XML I designed earlier
    • step 6: in Word indicate you want the new .xsn-file as a DIP

    This last step is a bit difficult for me, as distributing a .xsn to a user-dependant directory makes it hard to enter the path to the .xsn-file as it differs for each user (e.g.  c:\users\<username>\appdata\roaming\Microsoft\Templates\MyTemplates). Maybe I can use environment variables (like %APPDATA%)?

    Wednesday, September 11, 2013 9:39 AM