Table of contents
TOC
Collapse the table of content
Expand the table of content

SignatureProvider.ShowSignatureSetup Method (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Provides a signature provider add-in the opportunity to display the Signature Setup dialog box to the user.

Syntax

expression. ShowSignatureSetup( ParentWindow, psigsetup )

expression An expression that returns a SignatureProvider object.

Parameters

NameRequired/OptionalData TypeDescription
ParentWindowRequiredIOleWindowContains the handle to the window containing the Signature Setup dialog box.
psigsetupRequiredSignatureSetupSpecifies initial settings of the signature provider.

Remarks

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 is 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, then no dialog is necessary.

Example

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 &amp;&amp; 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).

See also

Concepts

SignatureProvider Object

Other resources

SignatureProvider Object Members

© 2018 Microsoft