proton-69 has asked for the wisdom of the Perl Monks concerning the following question:
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::PowerPoint to create slides
by Corion (Patriarch) on Jan 12, 2009 at 14:43 UTC | |
by toolic (Bishop) on Jan 12, 2009 at 14:55 UTC | |
|
Re: Win32::PowerPoint to create slides
by mikelieman (Friar) on Jan 12, 2009 at 14:45 UTC | |
by proton-69 (Novice) on Jan 13, 2009 at 04:41 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |