Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Win32::OLE PowerPoint Shapes

by jsprat (Curate)
on Oct 25, 2003 at 05:26 UTC ( [id://302029]=note: print w/replies, xml ) Need Help??


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 ?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found