Integrating Office Applications with SharePoint Document Libraries
Leverage the client integration features of Office and SharePoint to provide the best experience for Office users working in SharePoint document libraries
May 26, 2008
Organizations around the globe are planning and implementing migrations from traditional file shares to Microsoft SharePoint document libraries, which offer important capabilities to support collaboration, including version history; checkout; content approval; and the ability to manage content with metadata, views, and reports. If you’re not yet familiar with these capabilities of document libraries, see “The File Share Is Dead: Long Live SharePoint Document Libraries,” InstantDoc ID 95480.
Document libraries offer collaborative functionality in the Share- Point Web interface, but SharePoint-compatible applications such as Microsoft Office 2007 and Office 2003 integrate closely with document libraries, and expose SharePoint functionality directly within the Office UI. As slick as the client integration features of Office and SharePoint are, there are still a few gaps, and you must be prepared to bridge those gaps and train your users to leverage the features to provide the best-possible experience for Office users working in SharePoint document libraries.
It’s important to note that these features apply to Windows SharePoint Services (WSS) 3.0—you do not need Microsoft Office SharePoint Server (MOSS) 2007 to achieve the valuable solutions we’ll examine. Although we’ll look primarily at Office 2007 integration with SharePoint, the vast majority of these features are available in Office 2003 applications as well.
Saving Documents to Document Libraries
Most Office applications support direct integration with document libraries, so you can open documents from, save documents to, and create new documents in a document library. To save a document to a library, you can use the Save command in both Office 2007 and Office 2003. In Office 2007, you can also use the Publish menu’s Document Management Server command. This command is the same as the Save command, with the important distinction that the Save As dialog box opens focused on your Network Shortcuts folder on Windows Vista or your My Network Places folder on Windows XP. From the Save As dialog box, you can type the URL to the document library in which you want to save the document (e.g., http://sharepoint.contoso.com/ sites/marketing/shared%20documents). Press Enter to navigate to the library, thentype the document name and click Save.
Of course, having users type in long URLs to document libraries can introduce errors and can be a major obstacle to a productive user experience with SharePoint document libraries. There’s no default navigation to the libraries that a user requires. To support your users, you must create Network Locations (Vista) or Network Places (XP) to the libraries that users access regularly. To create a Network Location in Vista, open Computer from the Start menu. Right-click an empty area of the window in the Network Locations section, and select Add a Network Location. Click Next, select Choose a custom network location, then click Next again. Enter the URL to the library, click Next, then enter a user-friendly name, click Next and click Finish. The network location will be available in the Network Locations section of the Computer folder. For XP users, create a Network Place using the Add Network Place Wizard in the My Network Places folder. Now, when a user chooses the Publish to Document Management Server command, the Save As dialog box opens focused in the Network Locations (My Network Places) folder, and the user can navigate directly to the document library.
The obvious question arises: How can an enterprise deploy Network Locations (Network Places) to users across the organization? You can’t use Group Policy to deploy Network Locations. However, you can use a script to create a Network Location (Network Place). The script that Listing 1 shows creates a Network Location called Marketing Department Document Library that points to a SharePoint document library by using the Universal Naming Convention (UNC) path to the library (\sharepoint.contoso .comsitesmarketingshared documents). The CreateNetworkLocation subroutine at Callout A performs the heavy lifting. You can call the subroutine to create any Network Location—simply provide the full path to the Network Location and the target of the Network Location.
Opening Documents from a Document Library
Within Office Word, PowerPoint, and Excel, you can use the Open command to open documents from a document library. Either type the URL to the library or use a Network Location or Network Place to navigate to the library. To open documents directly from a document library’s Web interface, click the link to the document or click the Edit in Application command on the document’s edit menu, as Figure 1 shows. (One tip you should pass on to users: You don’t need to click the small arrow to make the edit menu appear—you can click the white space anywhere between the document title and the arrow.) As a best practice, you need to train users that clicking the link to a document will open it in read-only mode, and that they should use the Edit in Application command to make changes to the document. However, clicking the link for an Office 2007 document will prompt the user with a choice to open the document for reading or editing, as Figure 2 shows.
Document Checkout and Checkin
If you’ve configured the document library to require checkout, Office 2007 exposes checkout functionality in pop-up messages, like the one in Figure 2, that appear when you open the document from the library. You’ll also see commands that enable checkout and checkin within the Server menu in the Office button menu and in the document information panel that the screenin Figure 3 shows.
It’s highly recommended that you require checkout on document libraries that aren’t read only. To do so, open the Document Library Settings, click the Versioning Settings link, then at the bottom of that page, click Yes in the Require Check Out section. When checkout is required, users saving documents to the library must check in the document before the document is visible to other users. A user with the Override Check Out permission (included in the Design permission level) can check in a document that has been checked out by another user.
In Figure 2, you can see the Use my local drafts folder option, which is enabled by default. When someone uses an Office 2007 application to check out a document from a SharePoint document library, the document is stored in the SharePoint Drafts folder in the Documents folder (My Documents folder in XP). The user can work on the document offline, then when he or she checks in the document, it’s uploaded to the SharePoint server.
You can also work offline using Outlook to cache a document library. Outlook is best suited for taking multiple documents offline from read-only libraries, although it does support editing documents as well. See “Integrating SharePoint and Microsoft Office 2007 (www.officesharepointpro.com/content/87/Integrating-SharePoint-and-Microsoft-Office-2007.aspx) for more information.
Using Templates to CreateDocuments
To create a new document from a document library, you must provide one or more templates for appropriate types of documents. SharePoint offers blank templates for standard Office application documents when you create the document library. However, it’s likely you’ll want to provide customized templates that support the purpose of a specific library—a three-step process: creating a library for templates, creating content types that refer to those templates, and associating the content type with the document library. Here are thesteps:
1. Create a document library to store templates. Users who will create and modify the templates need Contribute permission to the library, and those who will create documents based on the templates need Read permission.
2. Upload templates to the library.
3. Next, create content types. The best practice is to create content types in the top-level site of a site collection. Click Site Actions and choose Site Settings.
4. Click Site Content Types and click Create.
5. Type a name for the content type. In the Select parent content type from drop-down list, choose Document Content Types.
6. In the Parent Content Type dropdown list, choose Document.
7. Optionally, select or create a content type group. Content type groups help you organize and locate content types.
8. Click OK.
9. Click Advanced Settings.
10. In the Document Template section, type the URL to the template, then click OK.
Continue to page 2
You can also configure other settings for the content type, including columns that describe the content, also called metadata, properties, or attributes. Properties appear on the Information tab in the Shared Workspaces task pane in Office 2003. In Office 2007, properties appear in the document information panel, which can be turned on by choosing the Properties command from the Prepare menu under Office. You can force the document information panel to be visible by configuring the Advanced Settings of the content type.
For example, if you create a content type for Sales Proposals, you can add a column called Customer. You can then use the property to create views of the document library that sort, filter, or group documents based on Customer. SharePoint search also indexes the column, so that users can search for a proposal using the Customer attribute. You can even make that column a required property. When users create Sales Proposals, they will be required to enter the Customer property. If checkout is required, documents cannot be checked in until required properties are populated.
After you create the content type, you can use the content type in one or more document libraries. In a document library, click Settings, then click Document Library Settings. Select Advanced Settings and click the Yes radio button that enables management of content types. Then click OK. The Document Library Settings page will now display a new section, Content Types. Click the link Add from existing site content types, select your custom content type, click Add, then click OK. You can delete the default Document content type from the library, assuming no documents have been added to the library. If you add more than one content type, you can change the order in which they appear on the library’s New menu, and set the default content type.
Now navigate back to the document library. Click the drop-down arrow on the New button in the library toolbar, and you’ll see the content type as an available document in the New menu. Documents that are created from a document library will be saved to the same library, by default, by both the Save command and the Publish to Document Management Server command.
Comparing Document Versions
In many work scenarios, users revise a document before the document is finalized. Most users save each new version of a document with a slightly different name, resulting in version proliferation that is difficult to manage. SharePoint’s support for versions, combined with Word’s ability to compare documents, unleashes a valuable capability.
You can enable versioning in the Versioning Settings page from a document library’s Settings page. Then, SharePoint automatically creates a new version of a document each time the document is saved. The document library displays only the most recent version of a document, but you can use the Version History command of the document’s edit menu to view, restore, or delete a previous version.
You can perform the same operations from within Office applications. Open the document from the library, click the Office Button, select the Server menu, then View Version History. You can even compare versions by using Word 2007. From the View Version History command, select an earlier version and click the Compare button. Word will compare the current opened version of the document with the selected previous version, allowing you to identify the differences between the versions.
Publishing Blog Entries
SharePoint offers blog capabilities through the Blog site template. You can post a blog entry using SharePoint’s Web interface, but for a richer editing experience you can use Word 2007 to create and publish a blog entry. Simply choose New Blog Post when you create a Word document, or use the Blog command on Word’s Publish menu. The first time you publish a blog entry, you’ll be prompted to configure the URL to the blog site, and if necessary, your user credentials, with permission to post entries.
Troubleshooting Client Integration Features
If you’re having trouble working with document libraries, you can find quite a few resources on the Internet with a quick search. The most common causes of trouble are:
• Browser choice: Before you spend too much time troubleshooting document library functionality, be sure you’ve tried it with Microsoft Internet Explorer (IE). Some functionality is reduced on other browsers.
• Browser security settings: Make sure your SharePoint server is in the Local Intranet or Trusted Sites zone. Experiment with those zones to decide which provides the functionality you desire. IE 7.0’s protected mode also creates additional prompts for user credentials, but before you turn it off for a zone, be sure you’ve researched the implications.
• Permissions: SharePoint’s UI is security trimmed, so you’ll only see commands and features based on the permissions given to your user account.
• Client integration: Some SharePoint functions, such as the Edit in Application (e.g., Edit in Word) command on the edit menu, or the Connect to Outlook command in the Actions menu, are visible only when Client Integration is enabled in the authentication provider for the Web application and zone. To check whether integration is enabled, open Central Administration, Application Management. Click Authentication Providers, then click the link to the zone. Ensure that Client Integration is selected— it’s enabled by default for Windows authentication, but is disabled by default for forms-based authentication (FBA).
• FBA: Some client integration features work differently, and a limited number of features aren’t available at all, when you use FBA instead of Windows authentication.
• Sign-in: If you use FBA, make sure that you select the Sign me in automatically check box in the logon screen, as Figure 4 shows. This option creates a cookie that lasts until the browser is closed, and client integration features can use that cookie to authenticate against SharePoint. You must select this option and leave the browser open while using client integration features against a SharePoint application using FBA. Despite its label, the option doesn’t sign you in to the site automatically the next time you return.
More than Word Can Say
I’ve focused on Word in this article, but PowerPoint, Excel, Access, OneNote, and Info- Path use similar processes to integrate with SharePoint document libraries. Although I’ve mainly discussed Word 2007, many of the core integration features are available in Office 2003 applications as well. There’s extraordinary integration between SharePoint lists and both Excel and Access—producing valuable solutions that I’ll cover in future articles. Be sure to visit office.microsoft.com and www.officesharepointpro.com for details about the capabilities and configuration of these other applications.
About the Author
You May Also Like