Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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++; } }
~~David~~


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2015-07-07 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls