Share via


WorkbookBase.SendFaxOverInternet 方法

將活頁簿的現用工作表以傳真方式傳送至指定的收件者。

命名空間:  Microsoft.Office.Tools.Excel
組件:  Microsoft.Office.Tools.Excel.v4.0.Utilities (在 Microsoft.Office.Tools.Excel.v4.0.Utilities.dll 中)

語法

'宣告
Public Sub SendFaxOverInternet ( _
    recipients As Object, _
    subject As Object, _
    showMessage As Object _
)
public void SendFaxOverInternet(
    Object recipients,
    Object subject,
    Object showMessage
)

參數

  • recipients
    型別:System.Object
    傳真收件人的傳真號碼和電子郵件地址。請以分號分隔多個收件者。
  • showMessage
    型別:System.Object
    true 表示會在傳送前先顯示傳真訊息,false 則表示在傳送傳真時不顯示傳真訊息。

備註

必須在使用者的電腦上啟用傳真服務,才能使用這個方法。

在 Recipients 參數中指定傳真號碼所使用的格式為 recipientsfaxnumber@usersfaxprovider 或 recipientsname@recipientsfaxnumber。 您可以使用下列登錄路徑,存取使用者的傳真提供者資訊:

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Services\Fax

使用這個登錄路徑的 FaxAddress 機碼 (Key),判斷收件者使用的格式。

選擇性參數

如需選擇性參數的詳細資訊,請參閱Office 方案中的選擇性參數

範例

下列程式碼範例使用 SendFaxOverInternet 方法,以傳真方式傳送目前活頁簿,並在傳送前先顯示傳真訊息。

這是示範文件層級自訂的範例。

Private Sub WorkbookSendFaxOverInternet()
    ' First add a range value to make sure that the workbook
    ' is faxed. An empty workbook will not be faxed.
    Globals.Sheet1.Range("A1", "A5").Value2 = 55
    Me.SendFaxOverInternet( _
        "ContosoSales@15555550101", _
        "For your review.", True)
End Sub
private void WorkbookSendFaxOverInternet()
{
    // First add a range value to make sure that the workbook
    // is faxed. An empty workbook will not be faxed.
    Globals.Sheet1.Range["A1", "A5"].Value2 = 55;
    this.SendFaxOverInternet("ContosoSales@15555550101",
        "For your review.", true);
}

.NET Framework 安全性

請參閱

參考

WorkbookBase 類別

Microsoft.Office.Tools.Excel 命名空間