SPFile.Convert method

NOTE: This API is now obsolete.

Transforms the file using the specified transformer.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[ObsoleteAttribute("This member is obsolete - use the specialized Office services instead", 
	false)]
public SPFileConversionResult Convert(
	Guid ConverterId,
	string newFileName,
	string configInfo,
	string handlerAssembly,
	string handlerClass,
	byte priority,
	string peopleToAlert,
	bool sendACopy,
	bool synchronous,
	out Guid workItemId
)

Parameters

ConverterId
Type: System.Guid

A System.Guid object that identifies the specific document transformer to use to transform the document.

newFileName
Type: System.String

A string that contains the leaf name of the file to be created. The extension is automatically appended by the transformer.

configInfo
Type: System.String

A string that contains the configuration information that is passed to the transform application when this transform is requested. The information is specific to the transform application and can be an empty string or a null reference (Nothing in Visual Basic).

handlerAssembly
Type: System.String

Optional. A string that specifies an assembly to load. Together with the handlerClass parameter, you can specify a pre-conversion or post-conversion handler to invoke before or after the conversion to do different tasks with the converted content, rather than just have the conversion framework make it into a file. The value of this parameter can be a null reference (Nothing in Visual Basic).

handlerClass
Type: System.String

Optional. A string that specifies a class to instantiate that is defined in the assembly specified by the handlerAssembly parameter. The class must implement the ISPConversionProcessor interface and its methods. Together with the handlerAssembly parameter, you can specify a pre-conversion or post-conversion handler to invoke before or after the conversion to do different tasks with the converted content, rather than just have the conversion framework make it into a file. The value of this parameter can be a null reference (Nothing in Visual Basic).

priority
Type: System.Byte

The priority of this transform. A lower

priority means this transform will be processed faster. Transforms that are initiated through the user interface have a priority of 1. Bulk operations that are performed through custom script should have a lower priority.

peopleToAlert
Type: System.String

A semicolon-delimited list of email addresses of people to whom to send an alert when the transform is completed. If the string is empty or a null reference (Nothing in Visual Basic), no alert is sent.

sendACopy
Type: System.Boolean

true to attach a copy of the transformed document to the notification; otherwise, false.

synchronous
Type: System.Boolean

true to run the conversion synchronously; otherwise, false.

workItemId
Type: System.Guid

An out parameter that gets the ID of the

work item for this asynchronous request, or that gets Guid.Empty in the case of a synchronous request.

Return value

Type: Microsoft.SharePoint.SPFileConversionResult
An SPFileConversionResult value that indicates the conversion status.
Show: