use Win32::OLE::Const; # may need to adjust version number depending on what you have installed my $const = Win32::OLE::Const->Load('Microsoft Office 12.0 Object Library'); ...->AddShape($const->{msoShapeRectangle}, ...); #### sub RGB { $_[0] | ($_[1] >> 8) | ($_[2] >> 16) } my $shape = $slide->Shapes->AddLine(100,200,300,400); $shape->{Line}{ForeColor}{RGB} = RGB(255,0,0);