Click here to Skip to main content
12,357,105 members (76,931 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#3.5
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 5-Oct-11 8:31am
YKK Reddy1.8K
Comments
SAKryukov 5-Oct-11 14:35pm
   
Good question, my 5.
--SA

1 solution

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

Solution 1

  Permalink  
v2
Comments
YKK Reddy 5-Oct-11 15:11pm
   
Hi,

Can you post a sample code. I have tried to use it but i somehow failed.
SAKryukov 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
YKK Reddy 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.
SAKryukov 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!
SAKryukov 5-Oct-11 15:48pm
   
Thank you, Espen.
--SA

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 5 Oct 2011
Copyright © CodeProject, 1999-2016
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