ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel bypassing Word password (https://www.excelbanter.com/excel-programming/413518-excel-bypassing-word-password.html)

Ray C

Excel bypassing Word password
 
I have an Excel workbook that loops through a bunch of Word documents in a
folder and processes each Word document. The problem is that some Word
documents ask for a password when Excel tries to open it.

Is there a way to bypass this? My client is annoyed each time because he has
thousands of Word documents to process. He runs it in the middle of the night
only to find out in the morning that there is a dialog box opened asking for
a password.

I'm wondering if there is a parameter that we pass to the Open method of the
Excel object in VBA.


Thanks in advance

Tim Williams

Excel bypassing Word password
 
The Word "Open" method has a "PasswordDocument" parameter you can use to
supply the password.

Tim

"Ray C" wrote in message
...
I have an Excel workbook that loops through a bunch of Word documents in a
folder and processes each Word document. The problem is that some Word
documents ask for a password when Excel tries to open it.

Is there a way to bypass this? My client is annoyed each time because he
has
thousands of Word documents to process. He runs it in the middle of the
night
only to find out in the morning that there is a dialog box opened asking
for
a password.

I'm wondering if there is a parameter that we pass to the Open method of
the
Excel object in VBA.


Thanks in advance




Ray C

Excel bypassing Word password
 
Hi Tim,

I solved the problem. I was making a call to the objWord.Unprotect method
which is why Word was asking for the password.

thanks for your help

"Tim Williams" wrote:

The Word "Open" method has a "PasswordDocument" parameter you can use to
supply the password.

Tim

"Ray C" wrote in message
...
I have an Excel workbook that loops through a bunch of Word documents in a
folder and processes each Word document. The problem is that some Word
documents ask for a password when Excel tries to open it.

Is there a way to bypass this? My client is annoyed each time because he
has
thousands of Word documents to process. He runs it in the middle of the
night
only to find out in the morning that there is a dialog box opened asking
for
a password.

I'm wondering if there is a parameter that we pass to the Open method of
the
Excel object in VBA.


Thanks in advance






All times are GMT +1. The time now is 06:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com