Partilhar via


CopyCtl Control

Applies to: SharePoint Foundation 2010

An ActiveX control that enables a user of Microsoft SharePoint Foundation 2010 to copy a document in a list to one or more locations.

Remarks

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

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

var obj = new ActiveXObject('STSUpld.CopyCtl');

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

Set obj = CreateObject('STSUpld.CopyCtl')

In both cases, the argument is the ProgId of the control, STSUpld.CopyCtl. For more information about ProgIds, see <ProgID> Key.

When you copy a document on a list, code in Copy.aspx (the page for copying documents) creates the control on the page by calling the function CreateCopyControl. It then uses the control to copy the document.

You can create a custom control for copying a document if it has the same ProgID (STSUpld.CopyCtl), uses the same method names, and provides the same functionality as described in this reference.