title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
SignatureProvider.ShowSignatureSetup method (Office) |
vbaof11.chm287002 |
|
|
458efe65-acb8-f329-7ca4-b0a316869c13 |
01/24/2019 |
medium |
Provides a signature provider add-in the opportunity to display the Signature Setup dialog box to the user.
expression.ShowSignatureSetup(ParentWindow, psigsetup)
expression An expression that returns a SignatureProvider object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
ParentWindow | Required | IOleWindow | Contains the handle to the window containing the Signature Setup dialog box. |
psigsetup | Required | SignatureSetup | Specifies initial settings of the signature provider. |
This method is used for both the insertion time configuration process and if a user later wants to re-configure the signature line. You display the Signature Setup dialog box during this callback and wait for the user to select OK or Cancel.
It's not necessary to display a dialog box for signature setup unless you specifically need information from the author about the signature line. If you can provide all of the necessary details back to Microsoft Office without user input, no dialog is necessary.
The following example, written in C#, shows the implementation of the ShowSignatureSetup method in a custom signature provider project.
public void ShowSignatureSetup(object parentWindow, SignatureSetup sigsetup)
{
bool firstInit = string.IsNullOrEmpty(sigsetup.AdditionalXml);
if (sigsetup != null && !sigsetup.ReadOnly && firstInit)
{
sigsetup.SigningInstructions = "Please sign this document.";
sigsetup.ShowSignDate = true;
sigsetup.AdditionalXml = "<TestSignatureData />";
}
using (Win32WindowFromOleWindow window = new Win32WindowFromOleWindow(parentWindow))
{
using (SignatureSetupForm sigsetupForm = new SignatureSetupForm(sigsetup))
{
sigsetupForm.ShowDialog(window);
if (!sigsetupForm.success && firstInit)
throw new System.Runtime.InteropServices.COMException("Canceled", -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).
[!includeSupport and feedback]