Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
loading an Office Theme through automation
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.O bject '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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I WANT THE OFFICE 2003 COLOR THEME BACK! | Setting up and Configuration of Excel | |||
How to start Office application in Automation mode via Office itself? | Excel Programming | |||
Theme Colors in Office 2007 | Excel Discussion (Misc queries) | |||
loading com addins with automation | Excel Programming | |||
Office automation application which will work with any version of office C#.NET | Excel Programming |