Sorry folks, I really have no idea what I am doing here, but this is my goal. I am building a powerpoint presentation that will be a compilation of various presentations. Right now I am having trouble adding the slides from the second file to the first file.
The following code returns this error: Win32::OLE(0.1502) error 0x80048240
in METHOD/PROPERTYGET "Slides" at powerpoint_create_withEDM.pl line 256
Can't modify non-lvalue subroutine call at powerpoint_create_withEDM.pl line 259.
sub addMyFile{
my $file = shift; #this is the filename of the file i am adding
my $fullpath = "$edmdir\\$file"; #full filename with path
my $pptadd = Win32::OLE->new( 'PowerPoint.Application', 'Quit' )or
+ die "Can't create PowerPoint OLE: $!\n";
$pptadd->{Visible} = 1;
my $addpres = $pptadd->Presentations->Open( $fullpath ) or die "Ca
+n't open PowerPoint file '$fullpath': $!\n"; # this is the second pr
+esentation.... i need to add it to the first one which has variable
+$pres
my @slides;
my $j = 1;
my $slide;
while ($addpres->Slides($j)){$slides[$j] = $addpres->Slides($j);$j
+++}; #this goes one too many, but I am working on it.
my $k = 1;
foreach $slide (@slides){ $pres -> Slides($slideIndex) = $slides[$
+k]; $slideIndex++; $k++};
}
Any help would be greatly appreciated.
Thanks,