use strict; use warnings; use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; use autodie; use File::Copy; my $errorprn1 = "\n! cannot find printer UK BAS 1ST FLOOR WEST PRN 1 on srv00086\n It may be out use, try using UK BAS 1ST FLOOR WEST PRN 2\n"; copy 'C://Temp//test.xls' , '//SRV00086//UK BAS 1ST FLOOR WEST PRN 1' or die "$errorprn1" ; #my $Word = Win32::OLE->new('Word.Application', 'Quit'); #$Word->{'Visible'} = 1; # if you want to see what's going on #$Word->Documents->Open("C:\\temp\\prn1.doc") #|| die("Unable to open document ", Win32::OLE->LastError()); #$Word->ActiveDocument->PrintOut({ #Background => 0, #Append => 0, #Range => wdPrintAllDocument, #Item => wdPrintDocumentContent, #Copies => 1, #PageType => wdPrintAllPages,