WorkbookBase.Signatures 屬性

取得活頁簿數位簽章的集合。

命名空間:  Microsoft.Office.Tools.Excel
組件:  Microsoft.Office.Tools.Excel.v4.0.Utilities (在 Microsoft.Office.Tools.Excel.v4.0.Utilities.dll 中)

語法

'宣告
Public ReadOnly Property Signatures As SignatureSet
public SignatureSet Signatures { get; }

屬性值

型別:Microsoft.Office.Core.SignatureSet
Microsoft.Office.Core.SignatureSet 集合,其中包含活頁簿的數位簽章。

備註

若要數位簽署 Excel 活頁簿,並驗證活頁簿中的其他簽章,您需要 Microsoft CryptoAPI 和唯一的數位簽章憑證。 CryptoAPI 是隨 Microsoft Internet Explorer 4.01 (含) 以後版本一起安裝。 您可以從憑證授權單位取得數位簽章憑證。

範例

下列程式碼範例會取得附加至目前活頁簿的簽章數目,並向使用者顯示適當的訊息。

這是示範文件層級自訂的範例。

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 安全性

請參閱

參考

WorkbookBase 類別

Microsoft.Office.Tools.Excel 命名空間