Click here to Skip to main content
15,072,134 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I need to digitally sign a document (Word/Excel) programatically using C#.
I found few posts on internet showing me how to just add a digital signature.

By default, i am using Microsoft Office Signing capabilities for this purpose.
Now, i want to embed an image to this Digital Signature Programatically and place it at the end of the file.

Can anyone help me?

Please note that if we try to add Digital Signature in Word/Excel file it asks us to select an image. I need to do that programatically

Thanks in Advance
Posted
Comments
BillWoodruff 5-Oct-11 17:43pm
   
Can you can use automation to get Excel and/or Word to perform this process via VSTO ?
HIRA_RANU 8-Nov-13 1:15am
   
how to add digital signature in word document and when i open it then i can find encrypted data
YKK Reddy 6-Oct-11 0:24am
   
Hi,

Can you post a sample code ?

1 solution

I googled it and asked many experts. They came out with different solutions which proved to be costly (performance was getting hampered).

So i have added image at the end of the word document using Interop assemblies and then applied Digital Signature (using open XML) approach.

Although word/Excel allows choosing an image while digitally signing, it is quite difficult to acheive this.

So, the functionality is broken into 2 parts.
1. Add Image file.
2. Add digital Signature
   
Comments
NishaTM 16-Apr-12 6:41am
   
Hi,

Can you please explain how to add digital signatures to a document (Word/Excel) programatically using C#?

Much Thanks,
Nisha

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900