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++;
}
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Outside of code tags, you may need to use entities for some characters:
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|