Workbook.Signatures Property (2007 System)

Gets the collection of digital signatures for the workbook.

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 ReadOnly Property Signatures As SignatureSet
'Usage
Dim instance As Workbook 
Dim value As SignatureSet 

value = instance.Signatures
[BrowsableAttribute(false)]
public SignatureSet Signatures { get; }
[BrowsableAttribute(false)]
public:
property SignatureSet^ Signatures {
    SignatureSet^ get ();
}
public function get Signatures () : SignatureSet

Property Value

Type: SignatureSet
A Microsoft.Office.Core.SignatureSet collection that contains the digital signatures for the workbook.

Remarks

To digitally sign Excel workbooks and verify other signatures in them, you need the Microsoft CryptoAPI and a unique digital signature certificate. The CryptoAPI is installed with Microsoft Internet Explorer 4.01 or later. You can obtain a digital signature certificate from a certification authority.

Examples

The following code example gets the number of signatures that are attached to the current workbook and displays an appropriate message to the user.

This example is for a document-level customization.

Private Sub GetSignatures()
    If Me.Signatures.Count = 0 Then
        MessageBox.Show( _
            "There are no signatures that are attached to the " _
            + "current workbook.")
    Else
        MessageBox.Show( _
            "Number of signatures attached to the current workbook: " _
            + Me.Signatures.Count.ToString())
    End If 
End Sub
private void GetSignatures()
{
    if (this.Signatures.Count == 0)
    {
        MessageBox.Show(
            "There are no signatures that are attached to the " 
            + "current workbook.");
    }
    else
    {
        MessageBox.Show(
            "Number of signatures attached to the current workbook: "
            + this.Signatures.Count.ToString());
    }
}

.NET Framework Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace