in reply to Win32::OLE->GetObject Fails on MS Word Document
Works fine for me with Perl V5.32.0 MSWin32-x64-multi-thread on Windows 10. Are you sure your file path is correct and the file isn't locked (opened by something else)? You could try checking that the file exists:
... my $docPath = 'D:\Delme~~\test.docx'; print "Found file '$docPath'\n" if -f $docPath; my $document = Win32::OLE->GetObject($docPath) or die "GetObject fai +led: $!\n"; ...
|
|---|