Document.SendFaxOverInternet Method (2007 System)

Sends the document to a fax service provider, who faxes the document to one or more specified recipients.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
Public Sub SendFaxOverInternet ( _
    ByRef Recipients As Object, _
    ByRef Subject As Object, _
    ByRef ShowMessage As Object _
)
'Usage
Dim instance As Document 
Dim Recipients As Object 
Dim Subject As Object 
Dim ShowMessage As Object

instance.SendFaxOverInternet(Recipients, _
    Subject, ShowMessage)
public void SendFaxOverInternet(
    ref Object Recipients,
    ref Object Subject,
    ref Object ShowMessage
)
public:
void SendFaxOverInternet(
    Object^% Recipients, 
    Object^% Subject, 
    Object^% ShowMessage
)
public function SendFaxOverInternet(
    Recipients : Object, 
    Subject : Object, 
    ShowMessage : Object
)

Parameters

  • Recipients
    Type: System.Object%

    The fax numbers and e-mail addresses of the people to whom to send the fax. Separate multiple recipients with a semicolon.

  • Subject
    Type: System.Object%

    The subject line for the faxed document.

  • ShowMessage
    Type: System.Object%

    true to display the fax message before sending it. false to send the fax without displaying the fax message.

Remarks

Using this method requires that a fax service is enabled on a user's computer. If a fax service is not enabled, the SendFaxOverInternet method throws an exception.

The format used for specifying fax numbers in the Recipients parameter is either recipientsfaxnumber@usersfaxprovider or recipientsname@recipientsfaxnumber. You can access the user's fax provider information using the following registry path:

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

Use the FaxAddress key value at this registry location to determine the format to use for a user. If this registry entry does not exist, no fax service is available.

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

Examples

The following code example uses the SendFaxOverInternet method to fax the document to a fax number using the format recipientsfaxnumber@usersfaxprovider. The code displays the document before sending the fax.

This example is for a document-level customization.

Private Sub DocumentSendFaxOverInternet()
    Me.SendFaxOverInternet("14255550101@consolidatedmessenger.com", _
        "For your review.", True)
End Sub
private void DocumentSendFaxOverInternet()
{
    object recipients = "14255550101@consolidatedmessenger.com";
    object subject = "For your review.";
    object showMessage = true;

    this.SendFaxOverInternet(ref recipients, ref subject, 
        ref showMessage);
}

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace