R
rhelsens
I am using the following simple code to copy certain slides from one
presentation to another using Office PIAs.
While this code works great for certain kits, one certains kits it
create huge files. Instead of ~2MB I am getting a 14 MB file. I have
been able to isolate the problem to only slide kits with alot of
text/graphs/etc...I assume this has to do with the embedded objects in
the source file, but why does the size increase? is there any
suggestion to handling this copy/paste for embedded objects versus just
text/shapes?
thanks in advance
foreach (DataRow dr in myDataTable.Rows) {
PowerPoint.Slide objSlide = objSource.Slides[ dr["slide_number"] ];
objSlide.Copy();
objDestination.Slides.Paste(objDestination.Slides.Count+1);
objDestination.Slides[objDestination.Slides.Count].Design =
objSlide.Design;
objDestination.Slides[objDestination.Slides.Count].ColorScheme =
objSlide.ColorScheme;
} //foreach
presentation to another using Office PIAs.
While this code works great for certain kits, one certains kits it
create huge files. Instead of ~2MB I am getting a 14 MB file. I have
been able to isolate the problem to only slide kits with alot of
text/graphs/etc...I assume this has to do with the embedded objects in
the source file, but why does the size increase? is there any
suggestion to handling this copy/paste for embedded objects versus just
text/shapes?
thanks in advance
foreach (DataRow dr in myDataTable.Rows) {
PowerPoint.Slide objSlide = objSource.Slides[ dr["slide_number"] ];
objSlide.Copy();
objDestination.Slides.Paste(objDestination.Slides.Count+1);
objDestination.Slides[objDestination.Slides.Count].Design =
objSlide.Design;
objDestination.Slides[objDestination.Slides.Count].ColorScheme =
objSlide.ColorScheme;
} //foreach