Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
Hi,

I have few Word and Excel files. Some of them are digitally signed. How do i programatically find whether the file has any digital signature ?

I referred to a code base mentioned in MSDN and other forums (converting the msdn code to .NET). But it didn't worked for me.

Can anyone suggest how to acheive this ?

I used XML approach for Digitally signing the documents.

Thanks in Advance
Posted
Comments
Sergey Alexandrovich Kryukov 5-Oct-11 14:35pm    
Good question, my 5.
--SA

1 solution

 
Share this answer
 
v2
Comments
[no name] 5-Oct-11 15:11pm    
Hi,

Can you post a sample code. I have tried to use it but i somehow failed.
Sergey Alexandrovich Kryukov 5-Oct-11 15:47pm    
Sorry, I don't have any time for a code sample in this field right now, hard to say when I can get it.
Could you try yourself more accurately and explain the problems?
--SA
[no name] 5-Oct-11 15:17pm    
Hi,

i have tried ur solution. It works fine except that there is a slight modification.

After making a call _Document.Signatures, the return value we get contains a flag "CanAddSignatureLine".
If it is true, the document is not digitally signed and vice-versa.

Thanks a ton man.
Sergey Alexandrovich Kryukov 5-Oct-11 15:48pm    
Oh, great, no experimenting anymore, thanks for reporting it back! Good point, by the way, good to know.
So, it looks like the issue is resolved, right?

You're welcome,
Good luck, call again.
--SA
Espen Harlinn 5-Oct-11 15:22pm    
5'ed!

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