Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I WANT THE OFFICE 2003 COLOR THEME BACK! sand_vg Setting up and Configuration of Excel 2 January 13th 10 04:42 PM
How to start Office application in Automation mode via Office itself? [email protected] Excel Programming 0 January 23rd 08 07:21 AM
Theme Colors in Office 2007 IUStacey Excel Discussion (Misc queries) 0 January 3rd 07 04:22 PM
loading com addins with automation Mario Excel Programming 2 June 24th 05 02:42 PM
Office automation application which will work with any version of office C#.NET Silly Programmer Excel Programming 1 February 21st 04 10:54 AM


All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"