Click here to Skip to main content
15,876,991 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a vbscript to open an excel 2010 file. But it doesn't open the file since the file is corrupted. I know how to handle corrupted file in VBA.

Is there a way to handle corrupted file in VBScript?

VBA Code:
workbooks.Open Filename:=abc.xlsx CorruptLoad:=XlCorruptLoad.xlRepairFile

Any help would be appreciated.

1 solution

VBScript does not support optional arguments, so you need to pass in every single argument that Open expects and pass a null string for those that you do not intend to specify.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900