
zuhrs
New User
May 25, 2015, 3:06 AM
Post #1 of 1
(6324 views)
|
OLE Error remote Procedure Not found
|
Can't Post
|
|
I have a perl script asa follows: $word = Win32::OLE->new('Word.Application', 'Quit') if($doc = $word->Documents->Open($file, 0, 0)) { do some processsing } else { my $errinfo = Win32::OLE->LastError(); } $word->Documents->Open($file, 0, 0) is giving error, when the file is read only So I modified it as follows: if ($doc = $word->Documents->Open({ FileName => $file, ConfirmConversions => 0, AddToRecentFiles => 0, Revert => 0, ReadOnly => 1, OpenAndRepair => 0 })) { } Now I copied the a doc file from server( a network path), which is read only, to another network path. When I run the script giving input as the new network path, the above code executed successfully. But when the input path is server path, the error as follows: 'Win32::OLE(0.1709) error 0x800706be: "The Remote procedure call failed" in METHOD/PROPERTYGET "Open"' Any idea about this problem. May be since the script tried opening the document from server path earlier, does word save the error path which was tried opening earlier ? If I remove the Read only property in server, it works fine if I use if($doc = $word->Documents->Open($file, 0, 0)) Thanks in advance.
|