>Mark, thanks for your help, but I can't seem to get this code to work. Any ideas ????
>
>oWord = createobject('Word.Application')
>with oWord
> .WordBasic.AppHide
> .WordBasic.FileOpen(lcFileName)
> .WordBasic.FileSaveAs('c:\test.doc')
> .WritePassword = "derek"
> .WordBasic.FileSaveAs('c:\test.doc')
> .WordBasic.AppShow
>endwith
>
>I also used the line
>
>.WordBasic.WritePassword = "Derek"
>
>and that failed to work.
>
>Do you have an example of using the WritePassword property ?????
>
>regards
>
>Derek
Hi Derek,
The writepassword is a property of the document, not Word, so use
loWord.ActiveDocument.WritePassword = "derek"
This worked for me :-)