Udostępnij za pośrednictwem


Workbook.HasRoutingSlip Property (2007 System)

Gets or sets a value that indicates whether the workbook has a routing slip.

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property HasRoutingSlip As Boolean
'Usage
Dim instance As Workbook 
Dim value As Boolean 

value = instance.HasRoutingSlip

instance.HasRoutingSlip = value
[BrowsableAttribute(false)]
public bool HasRoutingSlip { get; set; }
[BrowsableAttribute(false)]
public:
property bool HasRoutingSlip {
    bool get ();
    void set (bool value);
}
public function get HasRoutingSlip () : boolean 
public function set HasRoutingSlip (value : boolean)

Property Value

Type: System.Boolean
true if the workbook has a routing slip; otherwise, false.

Remarks

Setting this property to true creates a routing slip with default values. Setting the property to false deletes the routing slip.

Examples

The following code example checks the value of the Routed property to determine whether or not 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.

This example is for a document-level customization.

Private Sub RouteWorkbook()
    If Not Me.Routed Then 
        Me.HasRoutingSlip = True 
        Me.Subject = "Here is the forecast spreadsheet." 

        Dim routingSlip As Excel.RoutingSlip = Me.RoutingSlip
        routingSlip.Delivery = Excel.XlRoutingSlipDelivery.xlOneAfterAnother
        routingSlip.Message = "Please review and provide your feedback."
        routingSlip.Recipients = New String() _
            {"Don Hall", "Sydney Higa", "Ron Gabel"}
        Me.Route()
    End If 
End Sub
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();
    }
}

.NET Framework Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace