Share via


WorkbookBase.Signatures 属性

定义

获取工作簿的数字签名的集合。

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

属性值

包含工作簿数字签名的 Microsoft.Office.Core.SignatureSet 集合。

示例

下面的代码示例获取附加到当前工作簿的签名数,并向用户显示相应的消息。

此示例适用于文档级自定义项。

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

注解

若要对 Excel 工作簿进行数字签名并验证其中的其他签名,需要 Microsoft CryptoAPI 和唯一的数字签名证书。 CryptoAPI 随 Microsoft Internet Explorer 4.01 或更高版本一起安装。 可以从证书颁发机构获取数字签名证书。

适用于