Detecting if a Document is Signed

L

Lee

Hi All,

I need to detect if a document has been signed in the shutdown event.

The document has 4 signatures on it, each attached to a section.

I need to verify each section has a signature on it, and then change a
hidden text box status to approved. (that part I have got).

How can I detect if the document has been signed. I'd like to be able to do
this without making it a trusted form.

Thanks

Lee
 
S

Scott L. Heim [MSFT]

Hi Lee,

I am assuming you are using VS.NET for your InfoPath solution since you
referenced the "shutdown" event; however, I don't believe you will be able
to use this event as it is too late. However, if you have a custom button
on your form that users could click to close the form (or some other
method) you can get to the information you need. Let's assume I have 2
signature blocks added to my form - one for each Repeating Section and they
are named: Sig1 and Sig2.

The code you would use to see if these sections have been signed is:

if(thisXDocument.SignedDataBlocks["Sig1"].Signatures.Count > 0)
{
//Your code here;
}

I hope this helps!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top