• I am sorry,basically you need PIAs to run the code.After a bit of search I found that you can download the PIAs

    http://msdn.microsoft.com/en-us/library/aa159923(office.11).aspx

    and then reference them in C# code.HTH.

    Thank you all for your comments.I will soon post another method to protect Files.