OpenDocuments Control

Applies to: SharePoint Foundation 2010

An ActiveX control that enables users of Microsoft SharePoint Foundation 2010 to create documents based on a specified template, or to edit documents using their associated applications.


This control is defined in the OWSSUPP.dll file, a dynamic-link library (DLL) that is installed in the %ProgramFiles%\Microsoft Office\Office14\ directory on the client computer during Microsoft Office Setup.

To instantiate this control, use the following function in ECMAScript (JavaScript, JScript):

var obj = new ActiveXObject('SharePoint.OpenDocuments.3');

In Microsoft Visual Basic Scripting Edition (VBScript), use the following to instantiate the control:

Set obj = CreateObject('SharePoint.OpenDocuments.3')

In both cases, the argument is the programmatic identifier (ProgId) of the control, SharePoint.OpenDocuments.3. For more information about ProgIds, see <ProgID> Key.

In SharePoint Foundation, when a page that contains a view of a document library opens, code in the file OWS.js determines whether Microsoft Office is installed and, if it is, instantiates the control.


If the script on the page determines that the version of the application is Microsoft Office 2003, 2 is used as the version number. If the script on the page determines that the version of the application is earlier than Microsoft Office 2003, 1 is used as the version number.

The OWS.js file is located in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\1033 directory on each front-end web server in a SharePoint Foundation 2010 deployment.

When a user clicks New Document on the toolbar in the list view, or clicks Edit in Application_Name on the shortcut menu or on the toolbar in Windows Internet Explorer, methods of the OpenDocuments control are called to work with the document.