Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Win32::OLE PowerPoint Shapes

by jsprat (Curate)
on Oct 25, 2003 at 05:26 UTC ( #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
Node Status?
node history
Node Type: note [id://302029]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2020-09-24 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (132 votes). Check out past polls.

    Notices?