This works for me:
use Win32::OLE::Const; # may need to adjust version number depending on what you have install +ed my $const = Win32::OLE::Const->Load('Microsoft Office 12.0 Object Libr +ary'); ...->AddShape($const->{msoShapeRectangle}, ...);
Update:
how to change the color of the line that I can successfully draw
MSDN says: "[AddLine] Returns a Shape object that represents the new line." and clicking through that a bit (plus stealing sub RGB from Win32::OLE::TPJ) gives this, which works for me:
sub RGB { $_[0] | ($_[1] >> 8) | ($_[2] >> 16) } my $shape = $slide->Shapes->AddLine(100,200,300,400); $shape->{Line}{ForeColor}{RGB} = RGB(255,0,0);
In reply to Re: Win32::PowerPoint Extension for Lines and Shapes (updated)
by haukex
in thread Win32::PowerPoint Extension for Lines and Shapes
by nzsvz9
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |