My name is Amani Ahmed and I'm the program manager whose primary focus is programmability,
Office Professional,
which are the tools needed to build applications on top of Word (i.e. macros, add-ins, etc) In the last post, Travis demonstrated the power of Word to transfer data seamlessly back and forth with a SharePoint library. I'll build on that today by showing how to set up a Word document template to accomplish this. Here's a quick video demo of this process, and I've also stepped through it below. First, let me show you the SharePoint document library we'll be working with. As you can see, we already have three custom columns set up: Buyer, Seller,
Microsoft Office 2010 Home And Student, and Purchase price. These will be the properties we will map within our documents. Now let's start our new document template for this site. We'll create a very simple contract to use as our base. As you saw in Travis' demo,
Cheap Office 2010, the text in the template can be very detailed and complex, but for this example, let's keep things easy and just create a title and a place for the buyer name, seller name, and purchase date. We want the document to look nice, so we'll style the text "Contract" as a title using the Quick Styles ############## on the Home tab. We can now save this as a template to the desktop and name it contract.dotx. Next,
Office 2007 Activation Key, we need to drag the template into a directory that can be seen by the SharePoint site. I've already opened the "Forms" directory for our "Demo2" library and can see the default template. We can drop the new contract template in and close this window. Let's go back to the site and make sure we use the new template instead of the default. We can change this by going back to our document library and then choosing "Settings" --> "Document Library Settings" from the menu. Now,
Office 2010 Code, click "Advanced settings" under the "General Settings" heading. On the next page, we need to change the template URL from "template.doc" to our "contract.dotx" and hit OK at the bottom of the page. At this point, we can map the properties to our word template. Go back to Advance settings and click "Edit Template" to open the template in Word. We are now working with the template that is stored on the site, so when we save any changes, it will be that copy that is automatically updated. In order to map the properties we want, we need to add content controls that map to the columns of our site. We do this through "Insert"à"Quick Parts"à"Document Property" on the Ribbon. As you can see, the "buyer" property is in our list so we'll select that for document. The text "[buyer]" will appear in gray text – this is where the mapped property will be inserted in the document. Let's do the same for the other two properties and save our template. Finally, we can go back to our site to verify our changes by clicking 'OK' and returning to our library main page. From here, let's try making a new document for our library. Click "New" at the top and Word opens up a new document using our template. Enter in some data…save the document…and we can see the connection between Word and SharePoint that we set up. Amani Ahmed Program Manager | Word | Programmability <div