Word OLE Automation VB6 - Bypassing Password on Document?
Posted on 2004-09-13
I have written some code to loop through a folder, open relevant word docs, search the documents and add findings to a list box, then close then doc and so on. I am having a problem with documents that require a password or have advanced read only passwords etc which I do not have!
How am I able to bypass files that have those attributes and not attempt to open them? In other words, I do not want vb/word to attempt to open them if these factors are met?
Using the following without any parameters:
Set Doc = WordApp.Documents.Open(NewFileName)