SharedWorkspace.CreateNew Method
Creates a new document workspace on the server and adds the active document to the new shared workspace.
Namespace: Microsoft.Office.Core
Assembly: office (in office.dll)
Syntax
'Declaration
Sub CreateNew ( _
URL As Object, _
Name As Object _
)
'Usage
Dim instance As SharedWorkspace
Dim URL As Object
Dim Name As Object
instance.CreateNew(URL, Name)
void CreateNew(
Object URL,
Object Name
)
Parameters
URL
Type: System.ObjectOptional String. The URL for the parent folder in which the new shared workspace is to be created. If you do not supply a URL, the new shared workspace is created in the user's default server location.
Name
Type: System.ObjectOptional String. The name of the new shared workspace. Defaults to the name of the active document without its file extension. For example, if you create a shared workspace for Budget.xls, the name of the new shared workspace becomes "Budget".
Remarks
Use the CreateNew method to create a new shared workspace for the active document. Omit the 2 optional arguments to create the workspace using the name of the active document in the user's default server location.
The CreateNew method raises an error if the active document has changes that have not been saved. The document must be saved before it can be added to a shared workspace.