Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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 exploiting the Monastery: (5)
As of 2015-10-10 01:01 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls