Udostępnij za pośrednictwem


Document.Route Method (2007 System)

Routes the document, using the document's current routing slip.

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

Syntax

'Declaration
Public Sub Route
'Usage
Dim instance As Document

instance.Route()
public void Route()
public:
void Route()
public function Route()

Remarks

If the document does not have a routing slip, an exception is thrown. Use the HasRoutingSlip property to determine whether there is a routing slip attached to the document. Routing a document sets the Routed property to true.

Examples

The following code example creates a routing slip for the document, filling in the subject and recipient. The code then routes the document to the recipient.

This example is for a document-level customization.

Private Sub DocumentRoute()
    Me.HasRoutingSlip = True 
    Me.RoutingSlip.Subject = "Your feedback is needed." 
    Me.RoutingSlip.AddRecipient("someone@example.com")
    Me.Route()
End Sub
private void DocumentRoute()
{
    this.HasRoutingSlip = true;
    this.RoutingSlip.Subject = "Your feedback is needed.";
    this.RoutingSlip.AddRecipient("someone@example.com");
    this.Route();
}

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace