M
Miguel Velez
I'm trying to open an Ms Excel workbook which is inbedded
in an Ms Word document from am Ms Word macro. I use the
following code to open the workbook:
Dim xl As Object
With ActiveDocument.Shapes("Object 42").OLEFormat
.Activate
Set xl = .Object
End With
xl.UpdateChartFromPEST
Set xl = Nothing
Once the workbook is opened, I want to run
the "UpdateChartFromPEST" macro contained by the Excel
workbook (as you can see above). But when the workbook is
attempted to be opened, I get asked by Ms Excel if I want
to open a workbook that contains macros. I want to write
code, somewhere, that will automatically select the "Yes"
button. I've tried using the SendKeys statement in the Ms
Word macro but it hasn't worked.
Does anyone know how I can perform this task from code?
Miguel
in an Ms Word document from am Ms Word macro. I use the
following code to open the workbook:
Dim xl As Object
With ActiveDocument.Shapes("Object 42").OLEFormat
.Activate
Set xl = .Object
End With
xl.UpdateChartFromPEST
Set xl = Nothing
Once the workbook is opened, I want to run
the "UpdateChartFromPEST" macro contained by the Excel
workbook (as you can see above). But when the workbook is
attempted to be opened, I get asked by Ms Excel if I want
to open a workbook that contains macros. I want to write
code, somewhere, that will automatically select the "Yes"
button. I've tried using the SendKeys statement in the Ms
Word macro but it hasn't worked.
Does anyone know how I can perform this task from code?
Miguel