NAME
Win32::PowerPoint - helps to convert texts to PP slides
SYNOPSIS
use Win32::PowerPoint;
# invoke (or connect to) PowerPoint
my $pp = Win32::PowerPoint->new;
$pp->new_presentation;
... (load and parse your slide text)
foreach my $slide (@slides) {
$pp->new_slide;
$pp->add_text($slide->title, { size => 40, bold => 1 });
$pp->add_text($slide->body);
$pp->add_text($slide->link, { link => $slide->link });
}
$pp->save_presentation('slide.ppt');
$pp->close_presentation;
# PowerPoint closes automatically
DESCRIPTION
Win32::PowerPoint mainly aims to help to convert Spork (or Sporx) texts to PowerPoint slides. Though there's no converter at the moment, you can add texts to your new slides/presentation and save it.
METHODS
new
Invokes (or connects to) PowerPoint.
connect_or_invoke
Explicitly connects to (or invoke) PowerPoint.
quit
Explicitly disconnects and close PowerPoint this module (or you) invoked.
new_presentation
Creates a new (probably blank) presentation.
save_presentation (path)
Saves the presentation to where you specified. Accepts relative path. You might want to save it as .pps (slideshow) file to make it easy to show slides (it just starts full screen slideshow with doubleclick).
close_presentation
Explicitly closes the presentation.
new_slide
Adds a new (blank) slide to the presentation.
add_text (text, option)
Adds (formatted) text to the slide. Options are:
- left, top, width, height
-
of the Textbox.
- bold, italic, underline, size
-
of the Text.
- link
-
hyperlink address of the Text.
IF YOU WANT TO GO INTO DETAIL
This module uses Win32::OLE internally. You can fully control PowerPoint through these accessors.
application
returns Application object.
print $pp->application->Name;
presentation
returns current Presentation object (maybe ActivePresentation but that's not assured).
$pp->save_presentation('sample.ppt') unless $pp->presentation->Saved;
while (my $last = $pp->presentation->Slides->Count) {
$pp->presentation->Slides($last)->Delete;
}
slide
returns current Slide object.
$pp->slide->Export(".\\slide_01.jpg",'jpg');
$pp->slide->Shapes(1)->TextFrame->TextRange
->Characters(1, 5)->Font->{Bold} = $pp->{c}->True;
AUTHOR
Kenichi Ishigaki, <ishigaki@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Kenichi Ishigaki
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.