How to set Expiry Date to .ppt/.pptx files [modified]
-
Dear All We have been struggling to set expiry date to power point files with following code. Though there is no syntactical error in it, it fails to set expiry date for given file.
Microsoft.Office.Interop.PowerPoint.Presentation presentation; Microsoft.Office.Interop.PowerPoint.ApplicationClass oPPT = new Microsoft.Office.Interop.PowerPoint.ApplicationClass(); presentation = oPPT.Presentations.Open(pptFileName.ToString(), Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse); presentation.Application.Activate(); presentation.Permission.Enabled = true; presentation.Permission.Add("real_alias@real_site.com", MsoPermission.msoPermissionRead, dtExpireDate); presentation.Close(); presentation = null; oPPT = null;
We have done similar thing with excel and word files successfully and still are clueless for doing the same to Infopath file. Please guide Regards Sachinmodified on Sunday, December 09, 2007 9:00:07 PM
-
Dear All We have been struggling to set expiry date to power point files with following code. Though there is no syntactical error in it, it fails to set expiry date for given file.
Microsoft.Office.Interop.PowerPoint.Presentation presentation; Microsoft.Office.Interop.PowerPoint.ApplicationClass oPPT = new Microsoft.Office.Interop.PowerPoint.ApplicationClass(); presentation = oPPT.Presentations.Open(pptFileName.ToString(), Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse); presentation.Application.Activate(); presentation.Permission.Enabled = true; presentation.Permission.Add("real_alias@real_site.com", MsoPermission.msoPermissionRead, dtExpireDate); presentation.Close(); presentation = null; oPPT = null;
We have done similar thing with excel and word files successfully and still are clueless for doing the same to Infopath file. Please guide Regards Sachinmodified on Sunday, December 09, 2007 9:00:07 PM
I've tried looking into this. Have you figured out what is going on?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer