Encryption PowerPoint

S

Sudumeedum

Hi,
I am going to Encrypt the powerPoint application.here are the coding i am
using.

PowerPoint.





ApplicationClass powerPoint = new PowerPoint.ApplicationClass();
PowerPoint.

Presentation presentattion = powerPoint.Presentations.Open(localfileName,
MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoFalse);


switch (permType)



case PermissionLevel.SaveOnly:

presentattion.Permission.Add(email,

MsoPermission.msoPermissionSave, missing);


break;



case PermissionLevel.ViewOnly:

presentattion.Permission.Add(email,

MsoPermission.msoPermissionRead, missing);


break;





case PermissionLevel.PrintOnly:

presentattion.Permission.Add(email,

MsoPermission.msoPermissionPrint, missing);


break;



presentattion.Save();

powerPoint.Quit();


when saving the document it raised error

Error : Presentation (unknown member) : PowerPoint was unable to open or
save this document. Please ensure that you have access privileges to read or
write the document and that it is not encrypted.
Anyone have idea to fix this eroor. I doubled cheked about privilages to
read and write for the user. this error is not occuring when appling
permissions to word and excel file

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top