J
joestern
I can run the following Excel VBA actions successfully from Excel 2007:
Sub SaveAndLoad()
With ActiveWorkbook.Theme.ThemeColorScheme
.Save "C:\test.xml"
.Load "C:\test.xml"
End With
End Sub
However, when I try to automate this very similar code from PowerPoint 2007,
it fails.
Sub ApplyThemeToEmbeddedExcelChart
Dim xlWBK as Excel.Workbook
set xlWBK = ActivePresentation.Slides(1).Shapes(1).OLEFormat.Object
'this line works:
xlWBK.ActiveChart.ApplyDataLabels xlDataLabelsShowValue
'this line fails:
xlWBK.Theme.ThemeColorScheme.Load "C:\test.xml"
End Sub
The error I get is Run-time error '-2147024891 (80070005))':
Access denied. You do not have enough privileges to complete this operation.
Does anyone have any insight? I'd be ever so grateful!
Thanks,
Joe
Philadelphia, PA
Sub SaveAndLoad()
With ActiveWorkbook.Theme.ThemeColorScheme
.Save "C:\test.xml"
.Load "C:\test.xml"
End With
End Sub
However, when I try to automate this very similar code from PowerPoint 2007,
it fails.
Sub ApplyThemeToEmbeddedExcelChart
Dim xlWBK as Excel.Workbook
set xlWBK = ActivePresentation.Slides(1).Shapes(1).OLEFormat.Object
'this line works:
xlWBK.ActiveChart.ApplyDataLabels xlDataLabelsShowValue
'this line fails:
xlWBK.Theme.ThemeColorScheme.Load "C:\test.xml"
End Sub
The error I get is Run-time error '-2147024891 (80070005))':
Access denied. You do not have enough privileges to complete this operation.
Does anyone have any insight? I'd be ever so grateful!
Thanks,
Joe
Philadelphia, PA