InfoPath 2007: Customizing the default Document Information Panel

Posted on 12/15/2006 @ 2:51 PM in #SharePoint by | Feedback | 8011 views

Imagine a world, where  a user checks in a word document into a SharePoint 2007 document library, and during the save process, the document properties now get auto populated with data pulled from the document and SharePoint and a bunch of other sources. Not only that, the document properties are now a custom form that you can author to suit your organization.

I have this terrible guilt trip going on right now. I promised myself that I will take it easy in November and December. No travel, and in general a good sleep.

Now we all know that didn’t happen, but what did happen in the meanwhile was that my blog got somewhat ignored.

So here is another post before I rush to the next emergency.

I have alluded to numerous times that the document information panel (read: Document Properties) for a Word document is now nothing but an InfoPath 2007 form. Yes you heard that right – you can edit the form that shows “Document Properties” as an InfoPath form.

Now this opens a whole bunch of interesting possibilities. The use case I mentioned at the top of this blog post, is now possible, repeated here for your convenience.

Imagine a world, where  a user checks in a word document into a SharePoint 2007 document library, and during the save process, the document properties now get auto populated with data pulled from the document and SharePoint and a bunch of other sources. Not only that, the document properties are now a custom form that you can author to suit your organization.

Now, for today evening, I am not planning on going quite that crazy and write a blog post that is 40 pages long before I have to run. But at least I am going to give you a head start by demonstrating, how you could customize the default document information panel using SharePoint 2007, InfoPath 2007 and Word 2007.

Here goes.

Step #1: First thing you’ve gotta do is, setup a custom content type that will represent this word document with a custom document information panel. I went ahead and setup a custom content type called “CustomDoc”, and its parent content type was Document Content Types\Document.

Step #2: Next, when the CustomDoc content type is setup, go ahead and click on the “Document Information Panel settings” link. In the form that pops up at URL (http://moss2007/docs/_layouts/ctdmsettings.aspx?ctype=someguid), you should see three radio buttons. One to use the default template for Office applications, one to use an existing template, and one to upload a new DIP template.

Well, I haven’t yet created a DIP template, so I’m gonna have to create one. So go ahead and click on “Create a new custom template”.

Step #3: By clicking on “Create a new custom template”, InfoPath 2007 pops up displays the default DIP form in design mode. This is where you can go nuts with validating the document, and whatever the heck you want. (Insert: Learn InfoPath 2007 here). I’m going to keep this blog post germane and simple to what I am referring to, and do a simple modification instead.

On the Design Tasks Pane, click on “Controls”, and then Drag Drop a Text Box to right below the “Title” field that is already present.

Soon as you do that, a dialogbox pops up prompting you to bind this new field to something meaningful. I am going to bind it to dc:Creator under core:coreProperties as shown below.

Now you have immense flexibility here – you can customize look and feel, fonts etc. – I am avoiding that complexity here, and staying on topic.

Step #4. Save the form – don’t matter where, as you will soon have to publish it to SharePoint anyway.

Step #5. Under the Design Tasks pane, click on Publish Form Template. InfoPath 2007 gives you a list of choices, and tells you that the default selected “As a DIP for a SharePoint site content type..” is the recommended option anyway – so hey who am I to argue, go ahead and publish it as a DIP.

Step #6: Pick your favorite document library, or create a new one. Modify its content types to include the CustomDoc content type I just added. (Read more about custom content types)

Step #7: Go ahead and create a new document, view it’s Document Information Panel – should look like this:

SUPER NEAT EH??

Sound off but keep it civil:

Older comments..


On 2/22/2007 8:14:36 PM Clint said ..
I would like to take this one step further and add external data to the DIP via a secondary data source (the data is in a SQL database which I have an ODBC connection to). I would like two fields which are both dropdown boxes (choice) and the result of the first drop down filters/drives the selctions available in the second dropdown. I then would like to post this document to SharePoint and extract both of those field results into columns of their respective names so I can sort accordingly.

Can you help guide me through this one?

Thanks!


On 6/18/2007 12:49:15 AM Sharepoint User 0 said ..
*bump*

I'll second Clint's request for a how-to that shows how to create a custom DIP with Infopath where the selection of one field filters/drives the selections available in another field.

This would be incredible useful and I have been searching for more information on how to do precisely this.


On 9/20/2007 2:55:14 AM snehal parkar said ..
sahil ur post are always helpful 4 me regarding advance development in sharepoint


On 12/11/2007 4:53:59 PM OD said ..
One thing worth noting if you customize a DIP.
If you do so, you'll need infopath on ALL the clients that use this custum DIP!!

On 9/23/2010 7:04:14 AM AH said ..
Oh, neat. Lets add coplexity to a word document.. Yea that sounds like a great thing, because as we all know there is not a chance in hell that something will go wrong then.

InfoPath and Sharepoint are in no way error laden :P


On 4/27/2011 5:17:30 PM Afribuilder said ..
I got an error that "The form template cannot be published because the SharePoint list or site content type settings folder could not be found. Recreate the folder or the content type then try again. How do I do this?