¤ How can a password be provided to any password protected document while
¤ opening in an OLE object?
There is a password property in the Open method of the Documents collection:
Dim objWord As Word.Application
Dim objDocument As Word._Document
objWord = CreateObject("Word.Application")
objDocument = objWord.Documents.Open(FileName:="C:\Test Files\Test1.doc",
PasswordDocument:="password")
'...
'...
objDocument.Close()
objDocument = Nothing
objWord.Quit()
objWord = Nothing
Paul
~~~~
Microsoft MVP (Visual Basic)