(also posted in Word General)

Is there a way to automate changing the security option of standard Word
documents to make them read only or password protected? It's easy enough to
do one by one (Tools --> Options --> Security) but I'd go crazy having to do
this for several hundred. I'm using Word 2003 on a Windows XP platform.

Thanks.

pjs

Re: Batch process to change security of Word docs? by Doug

Doug
Wed Oct 26 14:47:49 CDT 2005

You could modify the code in the macro in the article "Find & ReplaceAll on
a batch of documents in the same folder" at:

http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

so that it opens each document and then saves it with the read only
attribute set

Check out the SaveAs method in the Visual Basic Help file for the syntax.

--
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

"pjs" <pjs@discussions.microsoft.com> wrote in message
news:945F8EC3-6F91-4E00-B0AC-5385E06CEFB5@microsoft.com...
> (also posted in Word General)
>
> Is there a way to automate changing the security option of standard Word
> documents to make them read only or password protected? It's easy enough
> to
> do one by one (Tools --> Options --> Security) but I'd go crazy having to
> do
> this for several hundred. I'm using Word 2003 on a Windows XP platform.
>
> Thanks.
>
> pjs



Re: Batch process to change security of Word docs? by pjs

pjs
Wed Oct 26 15:06:02 CDT 2005

Thanks. That might work.

Is script like this modifiable so that it not only works on every file in a
folder, but all teh subfolders as well?

pjs

"Doug Robbins - Word MVP" wrote:

> You could modify the code in the macro in the article "Find & ReplaceAll on
> a batch of documents in the same folder" at:
>
> http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm
>
> so that it opens each document and then saves it with the read only
> attribute set
>
> Check out the SaveAs method in the Visual Basic Help file for the syntax.
>
> --
> 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
>
> "pjs" <pjs@discussions.microsoft.com> wrote in message
> news:945F8EC3-6F91-4E00-B0AC-5385E06CEFB5@microsoft.com...
> > (also posted in Word General)
> >
> > Is there a way to automate changing the security option of standard Word
> > documents to make them read only or password protected? It's easy enough
> > to
> > do one by one (Tools --> Options --> Security) but I'd go crazy having to
> > do
> > this for several hundred. I'm using Word 2003 on a Windows XP platform.
> >
> > Thanks.
> >
> > pjs
>
>
>

Re: Batch process to change security of Word docs? by Helmut

Helmut
Wed Oct 26 16:30:53 CDT 2005

Hi,

for "readonly" only,
but lightening fast and no worry with subdirs.

C:\Documents and Settings\Helmut Weber>attrib /?
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H]
[drive:][path][filename]
[/S [/D]]

+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"