in reply to Re^5: To Read and Edit docx files in Windows 7
in thread To Read and Edit docx files in Windows 7

my @files = resolves the error. Thanks for the Hint.

Now I am with another Problem, when I open the word document named myfile.docx, another instance of "myfile" is getting opened in the name "~myfile.docx", Since i am parsing through all docx files(*.docx) in the working folder, The Win::OLE try to open this duplicate instance(~myfile.docx) also. But I am closing my opened Docs using $document->Close(), But that doesn't solve the issue. Any suggestion what goes wrong here?

Replies are listed 'Best First'.
Re^7: To Read and Edit docx files in Windows 7
by soonix (Chancellor) on Dec 17, 2014 at 08:00 UTC

    This is a temporary file created (and usually later deleted) by Word.

    Generally, you should exclude temporary files from processing. For Word, that's names beginning with ~ (except if your users really name their files like that :-/ ), and also files with zero size, which some versions of word seem to use as a lock indicator.