Building SharePoint Forms with Microsoft Word

Microsoft has announced that InfoPath is at the end of it’s life. Sure they promised to support InfoPath as it currently exists until 2024 which may seem a long ways off. If you have the typical form application, you may think that it will be replaced within the next ten years anyway so why not use InfoPath for now. There are a couple of commercial alternatives to InfoPath such as K2 or Nintex. I’ve not taken a look at either of these two products yet, but if I can get my hands on a trial of either of them, I’ll let you know what I think.

In the meantime, another often forgotten alternative is to create your forms in Microsoft Word. While Word based forms may not provide the functionality that you are familiar with from using InfoPath, you can create basic forms that even reference data in other SharePoint lists and build workflows to support the forms using SharePoint Designer. So for this week, I’ll check out the possibilities in Word so at least I can later compare this alternative to some of the other commercial products. Of course, one of the immediately obvious downsides of this technique is that all Word form users must have Microsoft Word on their local machine to open and fill in the form. Therefore, this is not a preferred solution for forms that I want the general public to use.

Before I begin working on the form, I need to define a few lists and libraries. The figure below shows the schema for a simple four table database to track lessons learned for a company. (These were used in the last couple of weeks to illustrate calculated columns and referential integrity between lists.) I will use the three tables on the left (Projects, Status, and Lesson Types) as lookup lists. The table on the right shows the additional metadata I want to add to a basic SharePoint document library.

Just like I created lookup columns and referential integrity links between lists last week, I can do the same thing between lists and a document library. To begin, I first create the lookup tables as custom lists. I will not go through the steps here on how to create custom lists because I assume that you know how to do that. I next create a new document library named LessonsLeaned.

I next went into the Library Settings found in the Settings group of the Library ribbon. I first need to add the metadata columns that will link to the lookup lists.

As mentioned before, I will not go through the details here of adding the columns as lookup columns since I have done that before. For your benefit, the following figure shows what the column schema should look like for the LessonsLearned document library when it is complete for this example.

I am now ready to edit the Word template that SharePoint uses to create a new document. To do this, I need to still be in the Library Settings page. Then in the General Settings section, I click the Advanced settings option.

Then I look for the Document Template section. On the right side I see the Template URL. This is where SharePoint puts a copy of the default blank Word template for document libraries based on Microsoft Word. (Yes, I can build document libraries with different default document types, but that is another story.) Don’t try to navigate to the URL. It is not directly visible when you navigate through SharePoint. However, I can click on the Edit Template link shown immediately below the URL.

SharePoint now opens the template in my local copy of Microsoft Word. I can now create my form using normal Microsoft Word skills, perhaps by creating a table and then placing text in some of the cells and leaving some of the cells empty where I want to add user prompts for data. I can also include any additional text in the document outside of the table if desired, I can format the table using one of the pre-defined table styles or create my own, and I can use any of the text formatting styles, insert images, and insert hyperlinks.

Once I have finished designing the overall form, I can then begin to add the document fields. I place the cursor where I want to insert the first document field and open the Insert ribbon. I then click the buttom half of the Quick Parts button in the Text group of this ribbon.

This opens a dropdown list of available fields. Some of these fields are part of the default document library definition or even part of the default Word template. However, you will notice the names of the custom fields I added to the LessonsLearned document library such as Project, Style, and Lesson Type.

In a similar fashion, I would add the other metadata fields from my document library. My final table might look something like the following:

When I am done defining the form, I simply save it. Microsoft Word remembers where I opened the template from and saves it back to SharePoint as a template in the correct document library.

Now to use the form, a user only has to navigate to the document library and open a new document. SharePoint uses the just saved template as the default document it opens.

I can also start a new document by opening the Files ribbon and clicking the top half of the New Document button in the New group as shown in the following figure.

SharePoint now opens the new template in my local copy of Microsoft Word were I can begin to enter data into any of the fields. To enter text data, just click on the field name and begin typing. If the field is a lookup field, when the user clicks on the field, a dropdown arrow appears to the right of the field. Clicking this dropdown arrow opens a list of the possible values from the corresponding SharePoint list.

When I save the document, I must specify a file name. However Microsoft Word does default the file location to be the SharePoint library where I saved the template.

In summary, I have built a simple form that can be used with other SharePoint lists and can save the data back to the SharePoint library as metadata. Is this form as powerful as an InfoPath form. Not at this time. Microsoft may be planning on enhancing the form features of Word in the future. In fact, a few rumors have already leaked that we may see some of these enhancements later this year, perhaps as soon as an upcoming SharePoint conference.

Until then, C’ya next time.


2 comments on “Building SharePoint Forms with Microsoft Word

  1. Great post, and alternative to InfoPath, definitely something people should keep in consideration when discussing their approach towards forms. I can get you a trial for Nintex if you would like, just shoot me an email.

  2. This is great! I applied it to forms at my work place, and this opened a lot of opportunities for us. Thank you very much!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s