in reply to Win32::OLE PowerPoint Shapes

Perl knows not what msoShapeRectangle is. You need to import the constants from the Office type library or supply them yourself.

Try something like this

use Win32::OLE; use Win32::OLE::Const 'Microsoft Office'; print msoShapeRectangle . ":" . msoShapeOval; __END__ results: 1:9

Replies are listed 'Best First'.
Re: Re: Win32::OLE PowerPoint Shapes
by Anonymous Monk on Oct 27, 2003 at 14:01 UTC
    Thankyou. I've got the shape added but now I'm stumped on how to set the fill color. Based on a ppt macro that does the same thing I think the perl code should be something like:
    $colorBox->Fill->{ForeColor} = ({Red=>255, Green=>255, Blue=>153});
    but this results in the error:
    Win32::OLE(0.1601) error 0x80020005: "Type mismatch" in PROPERTYPUT "ForeColor" at build_ql.prl line 121
    Any suggestions ?