c# - How do I open an already openeded presentation with PresentationDocument.Open() for PowerPoint Add in? -
i have powerpoint add in create, modify , save presentations. specific options opened presentation should stored in presentation file (.pptx) using open xml, when try ioexception:
**system.io.ioexception : process cannot access file 'test.pptx' because being used process.**
this snippet code:
**
using (presentationdocument pptpackage = presentationdocument.open(filename, true)) { // add options pptx file. }
**
thank you.
if need read opened presentation using open xml can way:
using (stream stream = new filestream(_filename, filemode.open, fileaccess.read, fileshare.readwrite)) using (presentationdocument pptpackage = presentationdocument.open(stream, false)) { // read pptx file. }
but can't change presentation way.
Comments
Post a Comment