Nevermind.

Fixed it. The password is the fifth parameter and not the second as shown in my first links. See: link.

 Code:
Break on

$rc = SetOption("WrapatEOL", "On")

$objExcel = CreateObject("Excel.Application")
? @ERROR
? @SERROR

$objWorkBook = $objExcel.Workbooks.open("D:\some folder\book1.xlsx",,,,"Test123")
? @ERROR
? @SERROR
Sleep 5

$objexcel.Visible = True


works fine.


Edited by Mart (2015-10-12 09:47 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.