DocumentSet.Import Method (Byte , String, SPFolder, SPContentTypeId, Hashtable, SPUser)
Imports a DocumentSet object.
Namespace: Microsoft.Office.DocumentManagement.DocumentSets
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Shared Function Import ( _
archiveBytes As Byte(), _
archiveName As String, _
parentFolder As SPFolder, _
docsetContentTypeId As SPContentTypeId, _
properties As Hashtable, _
user As SPUser _
) As DocumentSet
'Usage
Dim archiveBytes As Byte()
Dim archiveName As String
Dim parentFolder As SPFolder
Dim docsetContentTypeId As SPContentTypeId
Dim properties As Hashtable
Dim user As SPUser
Dim returnValue As DocumentSet
returnValue = DocumentSet.Import(archiveBytes, _
archiveName, parentFolder, docsetContentTypeId, _
properties, user)
public static DocumentSet Import(
byte[] archiveBytes,
string archiveName,
SPFolder parentFolder,
SPContentTypeId docsetContentTypeId,
Hashtable properties,
SPUser user
)
Parameters
archiveBytes
Type: []Byte array of the file to import the DocumentSet from
archiveName
Type: System.StringThe name of the DocumentSet to import, which will also be the name of this DocumentSet
parentFolder
Type: Microsoft.SharePoint.SPFolderThe SPFolder object to which the [DocumentSet] object is to be imported
docsetContentTypeId
Type: Microsoft.SharePoint.SPContentTypeIdThe SPContentTypeId object to use the import
properties
Type: System.Collections.HashtableA collection of properties to set on the DocumentSet after import
user
Type: Microsoft.SharePoint.SPUserThe SPUser to set as the owner and author of the imported DocumentSet
Return Value
Type: Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet
Returns DocumentSet.
Remarks
This function expects a file that was created using the DocumentSet.Export method.