In the for loop above what are the values for @slides, how that array is populated? I thought it if obj reference to $ppt_ref->new_slide my $slide = $ppt_ref->new_slide; But looks like it is not the case. Please guide me on this. Thanks. Proton-69use Win32::PowerPoint; # Global var(s) my $file = "E:\\rameshwar\\dedupe\\test_presentation.pptx"; # create construtor for ppt App and if script dies #un-expectedly then + quit the App my $ppt_ref = Win32::PowerPoint->new || die("Opps, failed to open PPT + App", Win32::OLE::LastError()); # Make it visible by setting property Visible to 1:: if set 0 it is in +visible $ppt_ref->{Visible} = 1; # set presentation-wide information $ppt_ref->new_presentation( background_forecolor => [255,255,255], background_backcolor => 'RGB(0, 0, 0)', pattern => 'Shingle', ); # and master footer if you prefer (optional) $ppt_ref->set_master_footer( visible => 1, text => 'My Slides', slide_number => 1, datetime => 1, datetime_format => 'MMMMyy', ); # do whatever you want to do for each of your slides my @slides; for my $slide (@slides) { # my $slide = $ppt_ref->new_slide; $ppt_ref->add_text($slide->title, { size => 40, bold => 1 }); $ppt_ref->add_text($slide->body_text); $ppt_ref->add_text($slide->link, { link => $slide->link }); } $ppt_ref->save_presentation($file); $ppt_ref->close_presentation;
In reply to Win32::PowerPoint to create slides by proton-69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |