Export (0) Print
Expand All
Expand Minimize

Workbook.Routed Property

Gets a value that indicates whether the workbook has been routed to the next recipient.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public virtual bool Routed { get; }

Property Value

true if the workbook has been routed to the next recipient; false if the workbook needs to be routed.

If the workbook was not routed to the current recipient, this property is always false (for example, if the document has no routing slip, or if a routing slip was just created).

The following code example checks the value of the Routed property to determine whether the workbook has been routed. If the workbook has not been routed, then the example sets the HasRoutingSlip property to true, sets the Subject property to a subject line for the routing slip, and then uses the RoutingSlip property to adjust the delivery type, message, and the recipients. Finally, the example calls the Route method to route the workbook.

private void RouteWorkbook()
{
    if (!this.Routed)
    {
        this.HasRoutingSlip = true;
        this.Subject = "Here is the forecast spreadsheet.";

        Excel.RoutingSlip routingSlip = this.RoutingSlip;
        routingSlip.Delivery = Excel.XlRoutingSlipDelivery.xlOneAfterAnother;
        routingSlip.Message = "Please review and provide your feedback.";
        routingSlip.set_Recipients(0,
            new string[] { "Don Hall", "Sydney Higa", "Ron Gabel" });
        this.Route();
    }
}

Show:
© 2015 Microsoft