Office 2007, Excel Chart Fill color, Access Denied

S

SamW

I have a PowerPoint 2007 Add-In (which uses VSTO3/.Net3.5), One of the
things that my add-in does is update embedded (OLE Embedded) excel chart
objects.

Using the following approach I succeed in getting a chart reference:
(using Excel=Microsoft.Office.Interops.Excel)

Excel.Workbook book = (Excel.Workbook) slide.Shapes(1).OLEFormat.Object;

there's lots of stuff that I can do but the particular problem I'm having is
when I'm trying to use the PIA wrapped chart and set the background color on
a series for instance:

Series mySeries = chart.SeriesCollection(1);
mySeries.Format.Fill.Background.RGB=1; //or any number

calling any method on mySeries.Format.Fill that sets a value causes an
UnauthorizedAccessException (with no stack information).

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top