Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a better way .... ?
Message
 
To
13/09/2002 08:06:25
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00700028
Message ID:
00700125
Views:
10
>>I have used the solution below to open an excel spreadsheet, disabling the macros.
>>
>
>I'm assuming the problem is that a dialog appears that needs a response. Use:
>
>loExcel.DisplayAlerts = .F.
>
>to prevent the dialog.
>
>
>As for macros, when you open a workbook by automation, the Auto macros (like AutoOpen) don't fire. So you needn't worry about infecting a machine by having a macro run when you open a workbook.
>
>I'm not sure how to disable the macros, though.
>
>Tamar

Thanks - I'll try that. I should point out that the Auto_Open macro definitely IS firing when opening a workbook through automation.

Perhaps I'm doing it a clumsy way.

I'm doing this :

LOCAL loExcel as Excel.Application

loExcel = NEWOBJECT("Excel.Application")

loExcel.Workbooks.Open("MyFile.Xls")

at this point I have dialog boxes in the Auto_Open that are displayed.

Thanks,
Jamie
Cheers,
Jamie
Previous
Reply
Map
View

Click here to load this message in the networking platform