I made C# program to extract text and Image from powerpoint
process is like this
save as pptx --> unzip --> extract text with XML
--> extract image from each slide
The problem is that opening power point file is delayed too much like 5 minutes after extract 5,000 ppt files with that program.
I tested new file with putting text "powerpoint" on the page, and it takes also 5 minutes to open it.
I reinstalled Office 2013 but nothing changed.
Opening speed recovered when installed Office 2016 deleting Office 2013,
but after extracting other ppts same problem happened.
Is there any way to prevent or solve this problem?
(periodic way will be ok. I tried deleting files in temp folder though)
I'll be really appreciated if anyone answer about it.
*The process when issue occured
----------------------------------------------------------------------------------
The point is opening new PowerPoint file without link or add-ins, just with some text( "ppt test") takes 5 minutes .
- I ran the program for 5,000 powerpoint
- closed the program
- restarted Window
- made new PowerPoint file
- inserted new text box with 8 letters "ppt test"
- saved the PowerPoint file
- opened the PowerPoint file
--> took 5 minutes
This PowerPoint file opened very fast in other computers
*We used these APIs
----------------------------------------------------------------------------------
Microsoft.Office.Interop.PowerPoint.Application
PPT Open : Microsoft.Office.Interop.PowerPoint.Presentation pptPresentation
--> pApplication.Presentations.Open
NameChange to pptx : --> pFileFullName.Replace
Save As : --> pptPresentation.SaveAs
decompressiong : System.IO.Compression
--> ZipFile.ExtractToDirectory
(Text Extract)
Image Export : --> Microsoft.Office.Interop.PowerPoint.Slide objSlide = pptPresentation.Slides[nSlideNum];
--> objSlide.Export
PPT Close : Microsoft.Office.Interop.PowerPoint.Application
--> pptPresentation.Close()
pptApplication.Quit()