Share via


WorkbookBase.Signatures Property

Definition

Gets the collection of digital signatures for the workbook.

public:
 property Microsoft::Office::Core::SignatureSet ^ Signatures { Microsoft::Office::Core::SignatureSet ^ get(); };
public Microsoft.Office.Core.SignatureSet Signatures { get; }
member this.Signatures : Microsoft.Office.Core.SignatureSet
Public ReadOnly Property Signatures As SignatureSet

Property Value

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

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 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());
    }
}
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

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.

Applies to