title: how to know which slides get modified by the user during presentation open and save in VSTO powerpoint c#
body: <p>On the <code>BeforeSave</code> event, I want to check that which slides get modified by the user. Technically I want to check that what was the state of slide when it opened and what is the state on saving, so I will get any acknowledgement for which slides are modified. </p>
  
  <pre><code>private void Application_PresentationBeforeSave(Presentation Pres, ref bool Cancel)
      {
          MessageBox.Show("before save event.....HITED");
      }
  </code></pre>
  
  <p>This event hits successfully. i want to check if slide is modified by user or not. I know possible ways as follows,</p>
  
  <p>(1) on presentation open event convert all slide in to images => on before save event again convert all slide in to image then compare that images. but this is too lengthy and time consuming approach. so i cant use</p>
  
  <p>(2) on presentation open event, get the every slide presentaionML and on before save get presentaionML then compare those string.  this is also unreliable process. i tried it. zip PPT then unzip it, it will show folder structure..slide folder is there which contain all slides xml in separate file.but this xml files not containing any slide ID or something(unique identifier) so we can not confidently compare with another destination slide.xml file. (if user change the seq of slide or delete slide then this scenario will fail) </p>
  
  <p>(3) i tried third approach like, on file open event make a copy of PPT file, then before save event access that copied PPT and each slide object will be compare with current active PPT slide object by using </p>
  
  <pre><code>bool flag =obj1.Equals(obj2); 
  </code></pre>
  
  <p>but this always return false. because obj1 family member of active presentation. and obj2 is member of non Active Presentation(because that we opened pragmatically ). so it is returning false even if slides are same on both side.</p>
  
  <p>is any inbuilt method for this. like which will give the list of slide that have been modified after opening.......?  </p>
  
  <p>any one have any other approach to solve this .....?</p>
  
  <p>i am working in VSTO c# PowerPoint. .net framework 4.5 </p>