SignatureProvider.ShowSigningCeremony method (Office)
Provides a signature provider add-in the opportunity to display the Signature dialog box to users, allowing them to specify their identity and then be authenticated.
Syntax
expression.ShowSigningCeremony(ParentWindow, psigsetup, psiginfo)
expression An expression that returns a SignatureProvider object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
ParentWindow | Required | IOleWindow | Contains the handle to the window containing the Signature dialog box. |
psigsetup | Required | SignatureSetup | Specifies initial settings of the signature provider. |
psiginfo | Required | SignatureInfo | Specifies information about the signature provider. |
Remarks
This method is internally called by the Microsoft Office application when the user is attempting to sign a signature line, or if the add-in has called the Sign method in the Office application's object model on a SignatureLine object.
Example
The following example, written in C#, shows the implementation of the ShowSigningCeremony method in a custom signature provider project.
public void ShowSigningCeremony(object parentWindow, SignatureSetup sigsetup, SignatureInfo siginfo)
{
using (Win32WindowFromOleWindow window = new Win32WindowFromOleWindow(parentWindow))
{
if (!((bool) siginfo.GetCertificateDetail(CertificateDetail.certdetAvailable)))
{
MessageBox.Show(window, "You need a digital certificate to sign this document", "Signing Ceremony", MessageBoxButtons.OK);
throw new System.Runtime.InteropServices.COMException("Canceled", -2147467260 /*E_ABORT*/);
}
using (SigningCeremonyForm signForm = new SigningCeremonyForm(sigsetup, siginfo))
{
signForm.ShowDialog(window);
if (!signForm.success)
throw new System.Runtime.InteropServices.COMException("Cancelled", -2147467260 /*E_ABORT*/);
}
}
}
Note
Signature providers are implemented exclusively in custom COM add-ins and cannot be implemented in Microsoft Visual Basic for Applications (VBA).
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for