Published
Saturday, February 24, 2007 1:23 PM
by
martin
If you've worked through my previous posts here, here, and here, you'll now have an InfoPath form template that you've signed and published, and you'll have imported the signing certificate into the Trusted Publishers store on at least one machine.
To use your published form template as the custom Document Information Panel (DIP) in an Office document, open your chosen Office application, and click on the Developer tab in the ribbon. Next, click Document Panel and you'll see the following dialog...

In the topmost textbox you have to supply the full network path to your published .xsn file. Then, in the drop-down-list you can choose to have your custom properties displayed by default, rather than the standard document properties. Finally, there's that checkbox that allows to you control whether your DIP is shown automatically when the document is loaded or saved.
If you've followed all the steps correctly, clicking OK here should put your custom DIP in place inside the Office application, ready to be used. Any values entered in your custom DIP will be saved along with the document for subsequent viewing.
That's it - your own custom DIP being used with your Office document.
Mind you, that doesn't have to be the end of the story. You can take this further in a couple of directions...
1. You're using InfoPath inside another Office application, and that means you can take advantage of any of InfoPath's more advanced features. For example, you can link your form template up to data sources that are outside of the document, such as a web service. That means your users can query external systems right from inside the Office app they're using.
2. Through the DIP, you've inserted a piece of custom XML into your Office document. You can write code to carry out actions against that XML. In Microsoft Word 2007, you can insert Content Controls into the body of the document itself, and bind those controls to nodes in this custom XML. That binding can't be done inside Word itself, so you need to set up relationships with code, or by using this tool that's available (source code too) on our CodePlex site.