use strict; use warnings; use Win32::OLE; use Win32::OLE::Variant; use Win32::OLE::Const; Win32::OLE->Option(Warn => 3); # Turn on warnings for easier debugging my $objServiceManager = Win32::OLE->new("com.sun.star.ServiceManager") || die "CreateObject: $!"; # create a new process my $desktop = $objServiceManager->createInstance("com.sun.star.frame.Desktop"); my @propValue = (); $propValue[0] = $objServiceManager->Bridge_GetStruct("com.sun.star.beans.PropertyValue"); $propValue[0]->{Name} = 'Hidden'; # This does not work! $propValue[0]->{Value} = 1; my $calc = $desktop->loadComponentfromUrl("file:///C:/My Documents/Summary-20101031.ods", "MyCalc", 0, \@propValue );