SharePoint Events

 11/18/15 - Webcast: Collaborative Project & Program Management for the AEC & Facilities with SharePoint & Office 365
 11/19/15 - Webcast: Easily Design, Brand and Enhance the User Experience of SharePoint and Office 365
 12/01/15 - Webcast: Legal Matters Management in SharePoint & Office 365
 12/02/15 - Webcast: Easily and Cost Effectively Migrate to Office 365 and the Cloud
 12/03/15 - Webcast: AEC and Facilities Document Control with SharePoint & Office 365 (RFI/Transmittal/Submittal Management)
 12/04/15 - Webcast: Drive User Adoption & Search with Automated Metadata in SharePoint
(More Links...)

 SharePoint Videos

 What’s Coming in Office 365 & SharePoint 2016
 Automating Contract Management with Workflow in the Cloud or On-Premise
 Manage Email in the Cloud or On-Premise with SharePoint & Office 365
 Governance Essentials for SharePoint 2013 and SharePoint Online
 Easily Move Email, Files and SharePoint to Office 365
 Enterprise Workflow in the cloud with SharePoint & Office 365
 Why SharePoint 2013
 SharePoint 2013 vs SharePoint Online and Office 365 Security, Compliance and eDiscovery
 Expanding the Use, Potential and Value of SharePoint and Office 365 through 3rd Party Applications
 Keys to Successful SharePoint Initiatives and User Adoption
 SharePoint 2013 vs. SharePoint Online: Workflow
 Ensure Auditability and Compliance with Advanced Workflows in SharePoint
 SharePoint 2013 vs. SharePoint Online and Office 365: Enterprise Content Management
 SharePoint 2013 vs. SharePoint Online and Office 365: Business Intelligence
 SharePoint 2013 vs. SharePoint Online: Search
 Power Business Intelligence for SharePoint Online and Office 365
 Enforce Governance with Ease in SharePoint and SharePoint Online
 Digitize Paper Driven Processes with Dynamic Web Forms in SharePoint
 Boost Performance and Eliminate Storage Limitations in SharePoint
 Out of the Box Business Intelligence and Reporting in SharePoint 2013
(More Links...)

 Archives ‭[1]‬

Opening SharePoint Links in a new window
Mail Enabled Lists vs. The Missing Windows 2008 POP3/IMAP Server 
7 Tools for SharePoint Developers
Public Facing Masterpage Techniques
How to Quickly Deploy and Activate a Timer Service to Your Site Collection
Custom SharePoint Master Page Feature with WSP Builder
Date Math with InfoPath
Enterprise Search Tricks and Tips Part 1
Populating Word Documents With SharePoint Data. Try The DIP!
Programmatic Deep Dive into Blank SharePoint Lookup Columns
1 - 10Next
Populating Word Documents With SharePoint Data. Try The DIP!

By: Omar Stewart

Before beginning the actual walkthrough, let’s take a look at the goal of the demonstration. We have a SharePoint list with some basic data. We want users to be able to open a new Word document (based on our template) and have it populate with data from that list.


· SharePoint 2007

· Word 2007

· InfoPath 2007 (Also required on client machine)

For our example, we have a standard SharePoint list which contains employee names, their most recently played game, and their Gamer Score.


Let’s begin by creating our custom content type. Head on over to Site Actions >> Site Settings >> Modify All Site Settings >> Galleries : Content Types >> Create.


We'll call our Content type "Gamer Score Card", the parent type will be "Document". We'll give our Score Cards a brief description, and place it in a new group called "Gaming".


Now that we have our Score Card Content Type, we can add columns that will be relevant to our scorecard. Click "Add from new site column" to add the following columns:

· "Recently Played Game" - Single line of text

· "Gamer Score" - Single line of text


We now have our Content Type in position, so we need to create a Document Library to house our newly created Score Cards. Create a new Document library called "Gamer Score Cards". We now have to let our Document Library know that we want it allow management of the Gamer Score Card Content Type.

From the document library, click Settings >> Document Library Settings.


Click Advanced Settings >> Enable the management of content types.


Back in the document library settings, we can now see the Content Type Section. First we need to add our Gamer Score Card Content Type to the Library. Click "Add from existing site content types"


Select the "Gaming" Group from the drop down. Click the "Gamer Score Card", then click Add.

Since we will only keep Gamer Score Cards in this document library, we can set it to our default content type. Click "Change new button order and default content type". We want to uncheck the Document Content Type, leaving only Gamer Score Card Checked.


If we go back to our Gamer Score Cards document library and click New, we should see a new word document appear. Now that we have our Gamer Score Card Content Types and A Document Library for them, it’s time to actually start designing our Score Card. Open MS Word and Design a template for your score card. You can design it to your liking, here’s a quick one I whipped up. You can download my template (here).


Save your file as a Word Document Template (.dotx)

Now that we've created a template for our Gamer Score Card, we can assign it to our Gamer Score Card Content Type. Go back to the Settings for our Gamer Score Card Content Type (Site Actions >> Modify All Site Settings >> Galleries: Site Content Types >> Gaming: Gamer Score Card.

Click Advanced Settings, and Browse to upload our new document template.


Now, navigate back to the Gamer Score Cards Document Library and click New. You should see a new instance of the gamer score card, using the template we just created.

You should also see the DIP (Document Information Panel) Appear. The DIP should also contain our three custom column names. (*If the DIP is not visible, click the Office button >> Prepare >> Properties.)


We now need to map the fields in the DIP, to text fields in word.

Click in the area next to "Name: " and from the word ribbon, click Insert >> Quick Parts >> Document Property.

You will be presented with a list of properties associated with this document template that we can drop into word including the columns that we associated with our content type.


· Select, Title to insert a title field which will represent the Name of our gamer.

· Select, Recently Played to insert the Recently Played Field.

· Select, Gamer Score to insert the player's gamer score.

As you can see, Word has inserted quick part text fields that will represent the Data from our DIP. If you just type in some values in the DIP, you'll see the word document update.

Drag these quick part fields wherever you want in your document. We can even Style them like regular text, I'll make the gamer score red, bold, and increase the font size.


Now that our quick parts are in place, we need to update our score card template.

If you entered any data in the DIP, go ahead and clear it. Now we need to save the document to our local hard disk as a Word Document Template .dotx (yes, again).

We now have to navigate back to our Content Type settings and re-upload the document template. This will overwrite the old template with our new version which includes our quick part fields.

Click Site Actions >> Site Settings >> Modify All Site Settings >> Galleries: Content Types >> Gaming >> Gaming Score Card.

Select Advanced, and browse to upload our new template for the second time.


If you return to the Gamer Score Cards Document Library, Click New, our updated template should show up with all the quick part fields positioned.

So our word document is reading from the DIP the way we want it to, We just have to populate the DIP with our SharePoint data. Fortunately, Microsoft InfoPath has powerful tools that allow you to customize the Document Information Panel, as if it were a standard InfoPath form.

Launch InfoPath 2007. The Getting Started Wizard appears.

Under Design A Form, select Design a Form Template.

For the Form Base, we need to select "XML or Schema" and click OK


InfoPath will now prompt you for the URL of the Schema, All you have to enter is the URL of the SharePoint Site that houses your Content Type. (i.e. http://mylocalsharepointserver).

After you enter your credentials, InfoPath will present you with a list of all the Content Types that live in that SharePoint Site.

We will of course select our "Gamer Score Card" Content Type and click Next.


InfoPath tells you that it will create a Form Template based on our Content Type's Schema. Tell InfoPath thank you, and click Finish to start having fun.

What was just the Document Information Panel in Word, is a now a full-fledged form in InfoPath.


Now….We want to populate our word document, with Data from our wonderful SharePoint List. So the first thing we need to do is add a data connection to that list.

From the InfoPath Toolbar Click Tools >> Data Connections >> Add.

Select to create a Data Connection to Receive Data, then click Next.


For the Source of our Data Select SharePoint Library or List


Again, InfoPath will prompt you for the URL of your SharePoint Site, (http://yoursharepointserver)

You will now be presented with a list of all your SharePoint Lists, and Document Libraries. We have our information in a List called "Gamer Score Card Data". So we'll select that one.


InfoPath now prompts us to select the fields that we want to import as our Data Source. We'll check to select the Name, Recently Played Game, ID, and Gamer Score fields.


Click Next, Next again, and then Finish to create your data connection.

Our data is now a part of the DIP, lets start assigning the data to our fields.

To make this interesting, we'll convert the Title field in our InfoPath form to a drop down menu, where the user can select from a list of employees, once a name is selected, the rest of the information in the form will be populated.

The first step is to right click on the Title Field in our Form, and click Change To >> Drop-Down List Box.


Now we need to have our list box read from our Data Source.

Right click on the Title List Box and click Drop-Down List Box Properties.

For List box Entries, We need to select "Look up values from an external data source", For the Data Source, select "GamerScoreCardData" (Or the name of the Data Source Connection you created).


Click the button to the right of the Entries Field to browse fields in your data source.

Expand the dataFields node and click to select the Folder "GamerScoreCardData". Click OK


Back in the Drop-Down List Box Properties, we need to set the Value to Name and the Display Name to Name.


If we click OK to close our Drop-Down List Box Properties, and click File >> Preview >> Preview Form. We can now see our Drop-Down List reads from a the list of names in our SharePoint List.


Close the preview to return to our InfoPath design window.

Now we need to set up some actions so that when a user is selected, their Recently Played Game and Gamer Score are displayed.

Right click on the Title Drop-Down List Box, and click Drop-Down List Box Properties.

Click Rules and then Add to add our first rule.

We'll call this first rule "Set Recently Played Game"

This action will need to select the recently played game of the currently selected employee.

Click Add Action.


Change the action to, Set a field's value.

Click the Browse button, then expand the Properties Node and select the field that contains "Recently Played Game"


Now for the value, we need to select the data from our SharePoint list, and filter it by our currently selected item.

Click the Fx button for the Value, Click Insert Field or Group, Change the Data Source to "GamerScoreCardData" and click once to highlight "Recently Played Game".

With the field highlighted, click Filter Data.


Click Add to add our new filter.

Change the First Field to "Name".

Leave the Filter String to "Is equal to".

For the Third Field, Click the Drop-Down List to 'Select a field or group'


Change the Data Source to Main >> Expand the Core Properties Node and select Title.


Click Ok, and then OK again to close the filter condition as well as all the other Dialog Boxes.



Click File >> Preview >> Preview Form to Preview the form. Now when we select a name from the drop down list. The player's recently played game is displayed.


Close the form preview.

We now need to add another action to set the player's gamer score.

Right click the Drop-Down List Box, click Drop-Down List Box Properties.

Click Rules. Click Add to add another Rule. We'll call this "Set Gamer Score".

Click Add Action. Change the action to "Set a field's value"

Click the Browse Fields button, expand the properties node , select "Gamer Score"


For Value, click the Fx button, Insert Field or Group, Change the Data Source to "GamerScoreCardData" Expand the Nodes to highlight "Gamer_Score". Click Filter Data.


Add a new Filter

Change the First Field to "Name".

Leave the Filter String to "Is equal to".

For the Third Field, Click the Drop-Down List to 'Select a field or group'

Change the Data Source to "Main", expand the Core Properties node, select "Title"


Keep clicking OK to close all the dialog boxes, and then preview your form. Now when you select a name, the player's recently played game as well as the Gamer Score should be displayed.

It’s probably a good idea to save your form locally, just to have as a backup.

Now that we have the form functioning the way it should, we can delete the Recently Played Field, and the Gamer Score Field from the form layout. That way, all the user will see is the Name Drop down when opening the Word Document.


We can also change the "Title:" label to something more understandable, like "Employee Name: " I will also add some formatting to the label, this is all optional.

My final form is just a label that says employee name, and has a drop down list box.


Save this version of your form with a different filename, just so we can access the different stages of our form.

Now it’s time to publish this form to SharePoint.

Click File >> Publish >> As a Document Information Panel template… >> Click Next.


Finally Click Publish.

Navigate back to the Gamer Score Cards Document Library, and click New to create a new Score Card.

If we look at the DIP, we should see our drop down list box. Select a name and enjoy the fruits of your labor. Your word document is populated (and formatted) with the data from the SharePoint list, that you configured.


--Omar Stewart



  GigWerks RSS  Gig Werks Mailing List 

 Contact Us



 On Demand SharePoint Webcast Recordings
 Upcoming Webinars
 SharePoint Resources
 Business Intelligence Resources
 Gig Werks Website

©2009 Gig Werks. All rights reserved. Privacy Policy