Hello, i'm very new to the vb.net framework.
This is my problem : i have a word document with a password-protection.
And the password is known.
I want to sent this document by email with another password.
So i have to copy the password-protected-word document and change the
pasword of the new document.
Please help me out here. Havent got a clue.
Thank You in advance.
nekesbrenddaddy was telling us:
nekesbrenddaddy nous racontait que :
> Hello, i'm very new to the vb.net framework.
> This is my problem : i have a word document with a
> password-protection. And the password is known.
> I want to sent this document by email with another password.
> So i have to copy the password-protected-word document and change the
> pasword of the new document.
Try something like this with a document that has "test" as a password to
open it:
Dim myDoc As Document
Set myDoc = Documents.Open(FileName:="C:\MyPath\Password.doc", _
PasswordDocument:="test")
With myDoc
.Password = "123"
.Close wdSaveChanges
End With

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org