Click here to Skip to main content
11,576,993 members (58,319 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#3.5

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 5-Oct-11 8:47am
YKK Reddy1.6K
BillWoodruff at 5-Oct-11 17:43pm
Can you can use automation to get Excel and/or Word to perform this process via VSTO ?
hirarani at 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 at 6-Oct-11 0:24am

Can you post a sample code ?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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
Member 8719776 at 16-Apr-12 6:41am

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

Much Thanks,

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

  Print Answers RSS
0 DamithSL 155
1 OriginalGriff 115
2 Afzaal Ahmad Zeeshan 95
3 Abhinav S 90
4 Lucifier Rocks 85
0 OriginalGriff 820
1 Sergey Alexandrovich Kryukov 631
2 Abhinav S 528
3 F-ES Sitecore 420
4 Suvendu Shekhar Giri 365

Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 26 Dec 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100