Suppress dialog while opening a write protected Excel document from VBS

  • Thread starter Thread starter Stefan
  • Start date Start date
S

Stefan

Hello all,
I have the following problem: I have a VBS script which opens an Excel
document using the assignment "Set objExcel =
CreateObject("Excel.Application")" to access the VBA API for
Excel2000. The script opens the workbook, fills in some attributes,
saves the book and closes it.
When the workbook is protected with a password, the VBS script
displays a dialog in which I have to confirm to open the workbook with
read permissions only.
How can I suppress this dialog?
Thanks
Stefan

P.S.: I am using the same mechanism for Word2000 and have the same
problem with some dialog boxes. Is there a general way to disable this
dialogs in office applications?
 
The workbooks.open command allows you to specify how you want the workbook
opened. If you use those arguments, you won't get prompted.

expression.Open(FileName, UpdateLinks, ReadOnly, Format, Password,
WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable,
Notify, Converter, AddToMRU)



See help for details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top