Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Using Win32::OLE and Excel - Tips and Tricks

by monarch (Priest)
on Jul 26, 2005 at 02:46 UTC ( #478057=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use Win32::OLE;
    use Win32::OLE::Const 'Microsoft Office';
    use Win32::OLE::Const 'Microsoft PowerPoint';
    use strict;
  2. or download this
    $Win32::OLE::Warn = 3; # die on errors
  3. or download this
    my $filename = "c:\\temp\\testpower.ppt";
  4. or download this
    print( "Starting Powerpoint Object\n" );
    my $power = Win32::OLE->GetActiveObject('Powerpoint.Application') ||
        Win32::OLE->new('Powerpoint.Application', 'Quit');
  5. or download this
    print( "Creating a presentation\n" );
    my $ppt = $power->Presentations->Add();
  6. or download this
    print( "Creating a slide\n" );
    my $slide = $ppt->Slides->Add(1, ppLayoutBlank);
  7. or download this
    my $pname = 'C:\WINNT\Web\Wallpaper\Fall Memories.jpg';
    my $shape = $slide->Shapes->AddPicture( $pname, msoFalse, 
    $shape->ScaleHeight( 0.5, msoTrue, msoScaleFromTopLeft );
    $shape->ScaleWidth( 0.5, msoTrue, msoScaleFromTopLeft );
  8. or download this
    print( "Adding a 4 wide by 3 high table\n" );
    my $table = $slide->Shapes->AddTable( 3, 4, 1, 100 );

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://478057]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2020-09-30 01:12 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (156 votes). Check out past polls.