I have an assignment that calls for me to password protect hundreds of .doc files. Can I write a macro that will password protect multiple documents without manual intervention. Further, I do have some files that are password protected, and I'm supposed to change their passwords, so I would need a macro that would open a document, and change the old password to a new one. Thanks for any help :) George (baffled in Houston, Tx)
You could modify the code in the article "Find & ReplaceAll on a batch of documents in the same folder" at: http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm to do what you want. You will find the Syntax for supplying the password if you check out Documents.Open in the VBE Help file. Also take a look at the article "Skipping Password-Protected Documents in a Batch Process" at: http://www.word.mvps.org/FAQs/MacrosVBA/CheckIfPWProtectB4Open.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Gdareos" <gDareos_at_la_louisiane.com> wrote in message news:902f64pm0kr2hh4e64cchlmnqomfbitu0h@4ax.com... >I have an assignment that calls for me to password protect hundreds of > .doc files. > > Can I write a macro that will password protect multiple documents > without manual intervention. > > Further, I do have some files that are password protected, and I'm > supposed to change their passwords, so I would need a macro that would > open a document, and change the old password to a new one. > > Thanks for any help :) > > George (baffled in Houston, Tx)
This is super helpful, and I'll check it out over the weekend. Thanks! Thanks! Thanks! George On Mon, 30 Jun 2008 05:35:33 +1000, "Doug Robbins - Word MVP" wrote: >You could modify the code in the article "Find & ReplaceAll on a batch of >documents in the same folder" at: > >http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm > >to do what you want. You will find the Syntax for supplying the password if >you check out Documents.Open in the VBE Help file. > >Also take a look at the article "Skipping Password-Protected Documents in a >Batch Process" at: > >http://www.word.mvps.org/FAQs/MacrosVBA/CheckIfPWProtectB4Open.htm