Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InsertFromFile method in Powerpoint loses formatting

Status
Not open for further replies.

jsimes

Programmer
Jan 18, 2001
8
0
0
US
Hello all,

I am using the InsertFromFile method to copy single slides from one Powerpoint presentation to a blank presentation.

I open a blank presentation then I loop through a list of ppt files like this:

mySlides = objPresentation.Slides;
for(i=1; i LTE formQTY; i=i+1){
theSlide = docPath & "ppt\" & i & ".ppt";
newSlide = mySlides.InsertFromFile(theSlide,i-1,1,1);
}

Then I saveAs to get a new file

// Save a presentation
newpresentation = objPresentation.SaveAS(docPath & "ppt\" & uniqueName & ".ppt",11, True);

The new file has all of the graphics and the text of the other slides but they are not formatted in the same way.

Is there a way to use the InsertFromFile method and preserve the formatting from the original slides?

Thanks for your help,

Joe Simes
 
I'm not familiar with programming but I have a "practical" solution to your problem, I hope.

1) Open your file where you want your original slides to be copied to
2) Click on Insert, Slides From File...
3) A "Slide Finder" window will pop up
4) Browse for your file that contains your original slides, and click Open
5) select the slides you desire (or all if you want, there's a button for that)
6) N.B.: be sure to have the box checked that's at the bottom-left of the "Slide Finder" window; that reads "Keep source formatting" -- this is what keeps your orignal format from your orignal slides
7) click Insert
8) your slide(s) should now appear exactly like the original slides

Note: I am using the example from Office XP; however, the procedure should be very similar with the previous versions of Powerpoint.

Hope this helps.
 
DeusRomulus,

Thanks for your reply but I am doing this on a web server. I am using Cold Fusion to create a PowerPoint Object that will then open and manipulate the PowerPoint slides. So I have to solve this problem programmatically.

I wish there were a parameter to the InsertFromFile Method that was "Keep source formatting".

Thanks again,

Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top