Table of contents
TOC
Collapse the table of content
Expand the table of content

SharedWorkspaceFolders.Add Method (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Adds a folder to the document library in a shared workspace. Returns a SharedWorkspaceFolder object.

Note Beginning with Microsoft Office 2010, this object or member has been deprecated and should not be used.

Syntax

expression. Add( FolderName, ParentFolder )

expression Required. A variable that represents a SharedWorkspaceFolders object.

Parameters

NameRequired/OptionalData TypeDescription
FolderNameRequiredStringThe name of the folder to be added to the current shared workspace.
ParentFolderOptionalSharedWorkspaceFolderThe subfolder in which to place the new folder, if not the main document library folder within the shared workspace. Add the folder to the main document library folder by leaving this optional argument empty.

Example

The following example adds a new folder to the folders collection of the shared workspace.

    Dim swsFolder As Office.SharedWorkspaceFolder 
    Set swsFolder = ActiveWorkbook.SharedWorkspace.Folders.Add("MyNewFolder") 
    MsgBox "New folder: " & swsFolder.FolderName, _ 
        vbInformation + vbOKOnly, _ 
        "New Folder in Shared Workspace" 
    Set swsFolder = Nothing 

See also

Concepts

SharedWorkspaceFolders Object

Other resources

SharedWorkspaceFolders Object Members

© 2018 Microsoft