Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^2: Adding Slide to Powerpoint

by ~~David~~ (Hermit)
on Feb 20, 2007 at 16:34 UTC ( #601131=note: print w/ replies, xml ) Need Help??

in reply to Re: Adding Slide to Powerpoint
in thread Adding Slide to Powerpoint

Everyone, Thanks for your help. For reference, here is the working code...

sub addMyFile{ my $file = shift; #this is the filename of the file i am adding my $fullpath = "$edmdir\\$file"; #full filename with path my $addpres = $ppt->Presentations->Open( $fullpath ) or die "Can't + open PowerPoint file '$fullpath': $!\n"; my @slides; my $j = 1; my $slide; while ($addpres->Slides($j)){$slides[$j] = $addpres->Slides($j);$j +++}; shift(@slides); #because I start at 1, i need to drop off the fir +st element. my $m; my $k = 0; foreach (@slides){ $m = $k+1; #because slide index starts at 1, not 0; $addpres->Slides($m)->Copy; #copy newly opened file slide... $pres->Slides->Paste($slideIndex); #past it into current pres +entation. $slideIndex++; $k++; } }

Comment on Re^2: Adding Slide to Powerpoint
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://601131]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2015-11-25 06:18 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (671 votes), past polls