Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

change  password excisting word document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nekesbrenddaddy - 14 Feb 2006 11:44 GMT
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.
Jean-Guy Marcil - 14 Feb 2006 14:06 GMT
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 

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.