S
Sean McPoland
Wonder if anyone can help
Code at end:
Basically I have a Powerpoint presentation with some VBA
to pull charts from Excel. The PPT VBA opens the file
runs the Excel Macro and then selects charts and adds then
to the PPT presentation, bog standard stuff, except when
doing the paste into the running PPT presentation slide it
says:
Security Warning:
The Document you are opening contains
macros...disable/enable etc
This happens specifically on the
ActiveWindow.View.Paste statement.
First thing is I know the excel sheet has macros - I just
ran it, with no problems, and I know the PPT has macros -
I am running it at this time! Why would paste try to open
the currently open document and ask this dumb question?
Win 2003 Sever, Office 2003 Pro
Thanks in advance
regards
Sean
Sub Macro1()
On Error Resume Next
Dim appXL As Excel.Application
Set appXL = New Excel.Application
appXL.Visible = True
appXL.Workbooks.Open "D:\xxx.xls"
appXL.Run ("sDriver")
appXL.Sheets("Chart1").Select
appXL.ActiveChart.ChartArea.Select
appXL.ActiveChart.ChartArea.Copy
ActivePresentation.Slides.Add(Index:=1,
Layout:=ppLayoutTitle).Select
ActiveWindow.Selection.SlideRange.Layout =
ppLayoutBlank
ActiveWindow.View.Paste
....
End Sub
Code at end:
Basically I have a Powerpoint presentation with some VBA
to pull charts from Excel. The PPT VBA opens the file
runs the Excel Macro and then selects charts and adds then
to the PPT presentation, bog standard stuff, except when
doing the paste into the running PPT presentation slide it
says:
Security Warning:
The Document you are opening contains
macros...disable/enable etc
This happens specifically on the
ActiveWindow.View.Paste statement.
First thing is I know the excel sheet has macros - I just
ran it, with no problems, and I know the PPT has macros -
I am running it at this time! Why would paste try to open
the currently open document and ask this dumb question?
Win 2003 Sever, Office 2003 Pro
Thanks in advance
regards
Sean
Sub Macro1()
On Error Resume Next
Dim appXL As Excel.Application
Set appXL = New Excel.Application
appXL.Visible = True
appXL.Workbooks.Open "D:\xxx.xls"
appXL.Run ("sDriver")
appXL.Sheets("Chart1").Select
appXL.ActiveChart.ChartArea.Select
appXL.ActiveChart.ChartArea.Copy
ActivePresentation.Slides.Add(Index:=1,
Layout:=ppLayoutTitle).Select
ActiveWindow.Selection.SlideRange.Layout =
ppLayoutBlank
ActiveWindow.View.Paste
....
End Sub