Perl: the Markov chain saw | |
PerlMonks |
in reply to Win32::PowerPoint Extension for Lines and Shapes
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);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Win32::PowerPoint Extension for Lines and Shapes (updated)
by nzsvz9 (Sexton) on Mar 07, 2021 at 18:16 UTC | |
by haukex (Archbishop) on Mar 07, 2021 at 20:43 UTC |