My quick look at PPT's help got me this VB example:

With myDocument.Shapes.AddShape(Type:=msoShapeRectangle, _ Top:=144, Left:=144, Width:=72, Height:=72) .Name = "Red Square" .Fill.ForeColor.RGB = RGB(255, 0, 0) .Line.DashStyle = msoLineDashDot End With
Which is not exactly in line with yours, but is close enough for MS work.

What caught my eye is the use of a VB function cleverly called RGB. Referencing the docs, one finds function RGB converts three arguments into a LONG representing the color. Here's a snippet from my VB's immediate window test cases.

print RGB(0,0,0) 0 print RGB(255,255,255) 16777215 print RGB(255,0,0) 255 print RGB(0,255,0) 65280 print RGB(0,0,255) 16711680
This function, at least, seems to perform as documented.

Armed with this knowledge, I constructed a Perl example that strives to curve-fit the MS function.

sub RGB { my ($red,$green,$blue) = @_; return $red + 256 * $green + 65536 * $blue; } print RGB(0,0,0) . "\n"; print RGB(255,255,255) . "\n"; print RGB(255,0,0) . "\n"; print RGB(0,255,0) . "\n"; print RGB(0,0,255) . "\n";
As you can see, the Perl function fits the VB data well within the expected error.
0 16777215 255 65280 16711680
There is no guarantee that our Perl port of VB's RGB function will solve your problem, but it should provide a good jumping-off point.

<Oobject name="tongue" method="in-cheek" comment="intended with best regards =)"/>

--Solo

--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.

In reply to Re: Win32::OLE PowerPoint Shapes by Solo
in thread Win32::OLE PowerPoint Shapes by tewelch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.