共用方式為


SPFile.Convert method

NOTE: This API is now obsolete.

轉換使用指定的轉換程式的檔案。

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

Syntax

'宣告
<ObsoleteAttribute("This member is obsolete - use the specialized Office services instead",  _
    False)> _
Public Function Convert ( _
    ConverterId As Guid, _
    newFileName As String, _
    configInfo As String, _
    handlerAssembly As String, _
    handlerClass As String, _
    priority As Byte, _
    peopleToAlert As String, _
    sendACopy As Boolean, _
    synchronous As Boolean, _
    <OutAttribute> ByRef workItemId As Guid _
) As SPFileConversionResult
'用途
Dim instance As SPFile
Dim ConverterId As Guid
Dim newFileName As String
Dim configInfo As String
Dim handlerAssembly As String
Dim handlerClass As String
Dim priority As Byte
Dim peopleToAlert As String
Dim sendACopy As Boolean
Dim synchronous As Boolean
Dim workItemId As Guid
Dim returnValue As SPFileConversionResult

returnValue = instance.Convert(ConverterId, _
    newFileName, configInfo, handlerAssembly, _
    handlerClass, priority, peopleToAlert, _
    sendACopy, synchronous, workItemId)
[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
)

參數

  • ConverterId
    Type: System.Guid

    System.Guid物件,識別要用來轉換文件特定的文件轉換程式。

  • newFileName
    Type: System.String

    字串,包含要建立檔案的分葉名稱。轉換程式所時,會自動加上副檔名。

  • configInfo
    Type: System.String

    字串,包含要求這個轉換時,會傳遞至轉換應用程式的組態資訊。資訊是轉換應用程式專用的且可以是空字串或 null 參考 (在 Visual Basic 的Nothing )。

  • handlerAssembly
    Type: System.String

    選擇性的。字串,指定要載入的組件。與handlerClass參數,您可以指定預先轉換或轉換後的處理常式,以叫用之前或之後執行轉換後的內容,不同的工作,而不是只需要把它變成檔案的轉換架構轉換。這個參數的值可以是a null reference (Nothing in Visual Basic)。

  • handlerClass
    Type: System.String

    選擇性的。字串,指定要具現化類別在handlerAssembly參數所指定的組件中定義。類別必須實作ISPConversionProcessor介面和方法。與handlerAssembly參數,您可以指定預先轉換或轉換後的處理常式,以叫用之前或之後執行轉換後的內容,不同的工作,而不是只需要把它變成檔案的轉換架構轉換。這個參數的值可以是 null 參考 (在 Visual Basic 的Nothing )。

  • priority
    Type: System.Byte

    這個轉換的優先權。低

    優先權,表示這個轉換會處理時效較快。透過使用者介面所啟始的轉型的優先順序都是 1。透過自訂指令碼執行的大量作業應該有較低的優先順序。

  • peopleToAlert
    Type: System.String

    以分號分隔的對象轉換完成時傳送警示的電子郵件地址清單。如果字串是空的或a null reference (Nothing in Visual Basic),會不傳送任何警示。

  • sendACopy
    Type: System.Boolean

    若要將轉換後的文件的複本附加至通知 ; true否則, false。

  • synchronous
    Type: System.Boolean

    true設為同步 ; 執行轉換否則, false。

  • workItemId
    Type: System.Guid

    取得的 ID 為out參數

    工作項目,為此非同步的要求,或取得在同步要求的情況下的Guid.Empty 。

傳回值

Type: Microsoft.SharePoint.SPFileConversionResult
SPFileConversionResult 值,指出轉換狀態。

請參閱

參照

SPFile class

SPFile members

Microsoft.SharePoint namespace

ISPConversionProcessor