use Win32::OLE; use Win32::OLE::Const; #Note const not loaded here . . . my $wdConst = Win32::OLE::Const->Load("Microsoft Word"); #const loaded explicitely . . $doc->PrintOut({ PrintToFile => 1, OutputFileName => "$dir/test.pdf", Background => 0, Append => 0, Range => $wdConst->{wdPrintAllDocument}, Item => $wdConst->{wdPrintDocumentContent}, Copies => 1, PageType => $wdConst->{wdPrintAllPages}, });