Share via


SharedWorkspaceFiles.Add Method

Adds a file to the document library in a shared workspace.

Namespace:  Microsoft.Office.Core
Assembly:  office (in office.dll)

Syntax

'Declaration
Function Add ( _
    FileName As String, _
    ParentFolder As Object, _
    OverwriteIfFileAlreadyExists As Object, _
    KeepInSync As Object _
) As SharedWorkspaceFile
'Usage
Dim instance As SharedWorkspaceFiles
Dim FileName As String
Dim ParentFolder As Object
Dim OverwriteIfFileAlreadyExists As Object
Dim KeepInSync As Object
Dim returnValue As SharedWorkspaceFile

returnValue = instance.Add(FileName, ParentFolder, _
    OverwriteIfFileAlreadyExists, KeepInSync)
SharedWorkspaceFile Add(
    string FileName,
    Object ParentFolder,
    Object OverwriteIfFileAlreadyExists,
    Object KeepInSync
)

Parameters

  • FileName
    Type: System.String

    Required String. The path and filename of the file to be added to the current shared workspace.

  • ParentFolder
    Type: System.Object

    Optional SharedWorkspaceFolder. The subfolder in which to place the file, if not the main document library folder within the shared workspace. Add the file to the main document library folder by leaving this optional argument empty.

  • OverwriteIfFileAlreadyExists
    Type: System.Object

    Optional Boolean. True to overwrite an existing file by the same name. Default is False.

  • KeepInSync
    Type: System.Object

    Optional Boolean. True to keep the local copy of the document synchronized with the copy in the shared workspace. Default is False.

Return Value

Type: Microsoft.Office.Core.SharedWorkspaceFile

See Also

Reference

SharedWorkspaceFiles Interface

SharedWorkspaceFiles Members

Microsoft.Office.Core Namespace