Is there any method within Perl which would allow me to get the object in a read only mode,
so as to avoid the dialog that pops up if the file is locked by another user?
$document = Win32::OLE->GetObject("$docFile")
or die "can't open $docFile";
That’s because you’re doing it wrong.
GetObjectjust opens an object with the default behavior. You should create theWord.Applicationobject:Then use the
DocumentscollectionOpenmethod with the named parameterReadOnly. Like so:Read http://msdn.microsoft.com/en-us/library/bb216319.aspx for the syntax for
Documents.Open