O
Oliver Bock
Hi,
I am trying to create standalone charts in PowerPoint 2007 using the
charting API that was exposed as part of Office 2007 service pack 2. It
mostly works, but I am finding it to be flaky. In particular, sometimes
my charts come up blank and sometimes they have corrupted series. When
I generate charts repeatedly they sometimes all work, but usually about
one in 20 has a problem.
I guess that I am doing something wrong, but I can find little overview
documentation.
My questions are:
- Are there any more extensive samples than the fragments in
http://blogs.msdn.com/officedevdocs...art-object-model-in-powerpoint-and-word.aspx?
I have found http://msdn.microsoft.com/en-us/library/bb676881.aspx,
but it is really about pasting from Excel, which is not what I want.
- Is there any way to stop Excel popping up whenever a chart is
inserted? I insert many (sometimes hundreds) charts.
- If not, is there a proper way to shut down the Excel windows that pop
up? Should I close the workbook after each to avoid Excel being
started repeatedly?
- What is the correct way to clear the sample data that appears?
I don't use Range.ClearContents() because that gets rid of the
draggable rectangle that lets users easily control which parts
of the data to plot. Instead I just set each cell's formula to
an empty string.
- Using SetSourceData also removes the draggable rectangle that lets
the user easily control which parts of the data to plot. This is a
nuisance to my users because they often want to edit the charts after
creating them. I have found that I can control this rectangle by
calling Resize on the first (and only) ListObject in the Worksheet.
Is this kosher?
I am trying to create standalone charts in PowerPoint 2007 using the
charting API that was exposed as part of Office 2007 service pack 2. It
mostly works, but I am finding it to be flaky. In particular, sometimes
my charts come up blank and sometimes they have corrupted series. When
I generate charts repeatedly they sometimes all work, but usually about
one in 20 has a problem.
I guess that I am doing something wrong, but I can find little overview
documentation.
My questions are:
- Are there any more extensive samples than the fragments in
http://blogs.msdn.com/officedevdocs...art-object-model-in-powerpoint-and-word.aspx?
I have found http://msdn.microsoft.com/en-us/library/bb676881.aspx,
but it is really about pasting from Excel, which is not what I want.
- Is there any way to stop Excel popping up whenever a chart is
inserted? I insert many (sometimes hundreds) charts.
- If not, is there a proper way to shut down the Excel windows that pop
up? Should I close the workbook after each to avoid Excel being
started repeatedly?
- What is the correct way to clear the sample data that appears?
I don't use Range.ClearContents() because that gets rid of the
draggable rectangle that lets users easily control which parts
of the data to plot. Instead I just set each cell's formula to
an empty string.
- Using SetSourceData also removes the draggable rectangle that lets
the user easily control which parts of the data to plot. This is a
nuisance to my users because they often want to edit the charts after
creating them. I have found that I can control this rectangle by
calling Resize on the first (and only) ListObject in the Worksheet.
Is this kosher?