Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Word doc readonly and auto bypass password?

Status
Not open for further replies.

SJG0526

Programmer
Jul 5, 2002
108
US
I'm running thru a list of docs with VBa, some are password protected, some have lost links to other things like spreadsheets. When my loop hits one of these docs, the window pops up asking for a password or asking if I want to delete the link. I want to eliminate user intervention and just open the doc up, deleteing any links. They are opening in readonly but the user still has to hit a key to clear those windows.

Any idea how to programmatically check for these popup windows and bypass them?

Thanks!
 

I have done the same thing with excel and some of the optional parameters in the open statment are for user name and password. So what I did is pass in "DUH" for each for every workbook I was opening. The unprotected workbooks ignored these but the ones that were protected threw an error that I was able to catch and proceed without any user intervention. Maybe, just maybe, this will work for you. I have not tried it but it is a thought.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top