Subscribe to Windows IT Pro
May 27, 2008 12:00 AM

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
Windows IT Pro
InstantDoc ID #98875
Rating: (2)
Downloads
98875.zip

Executive Summary:

Document libraries offer collaborative functionality in the SharePoint 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. This article discusses how to leverage the features to provide the best-possible experience for Office users working in SharePoint document libraries.

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, then type 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 .com\sites\marketing\shared 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 screen in 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 Create Documents
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 the steps:

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

Related Content:

ARTICLE TOOLS

Comments
  • Dan
    4 years ago
    Jun 19, 2008

    It is a VBScript. Copy & Paste it to NOTEPAD.
    Choose File--> Save As
    Enter a name like "NetworkPlace.vbs"
    BE SURE TO INCLUDE THE QUOTES around the name, otherwise notepad will save it as NetworkPlace.vbs.txt

    REMOVE THE LINE that say "Begin Callout A"
    Change the "friendly name" in sFolderPath (currently "Marketing...") to the right friendly name for your nemtwork place.
    Change the target in sTargetPath to point to the right location.

    Save again

    Open a command prompt and run

    cscript.exe "NetworkPLaces.vbs"
    (or whatever name you used for the script)

  • Steven
    4 years ago
    Jun 17, 2008

    How do I run the script in listing 1?

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.