Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / December 2007

Tip: Looking for answers? Try searching our database.

Add chart via code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott - 29 Nov 2007 23:51 GMT
Inside of a WPF project written in C# I'm creating a new PPT presentation via
the interop libraries provided by installing Vistual Studio 2008 (so I guess
that's VSTO 3.0)

I've created the ppt file without issues, but I can't figure out how to add
a chart to a slide.  I've got all the data that I want, but when I call the
add chart routine it doesn't seem to give me a way to set the data.  

Can anyone provide an example of how to do this?
Steve Rindsberg - 30 Nov 2007 17:28 GMT
> Inside of a WPF project written in C# I'm creating a new PPT presentation via
> the interop libraries provided by installing Vistual Studio 2008 (so I guess
[quoted text clipped - 5 lines]
>
> Can anyone provide an example of how to do this?

If the story in VS is the same as in VB/VBA, no.  MS hasn't exposed the chart
object model in 2007.  

Another approach might be to install MSGraph (which is available as a custom
install option in Office 2007) and use that.  Or if Excel exposes the OM, you
might be able to automate it to create the chart and copy/paste or otherwise
insert that into PPT.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Austin Myers - 30 Nov 2007 18:25 GMT
>> Inside of a WPF project written in C# I'm creating a new PPT presentation
>> via
[quoted text clipped - 13 lines]
> chart
> object model in 2007.

Nope, no magic addition to the OM via VS.  What ya see is what ya get...

Signature

Austin Myers
MS PowerPoint MVP Team

Provider of PFCPro, PFCMedia and PFCExpress
www.playsforcertain.com

Steve Rindsberg - 30 Nov 2007 21:01 GMT
> Nope, no magic addition to the OM via VS.  What ya see is what ya get...

IOW, WYSIVBAIWYGIVSTO?

(what you see in vba is what you get in VSTO?)

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Brian Reilly, MVP - 02 Dec 2007 01:32 GMT
Steve,
I think we have to wake up Cindy Meister who is now a VSTO MVP and was
a Word MVP who actually used Excel and PPT.

Yo, Cindy my darling
You listening?

Brian Reilly, MVP

>> Nope, no magic addition to the OM via VS.  What ya see is what ya get...
>
[quoted text clipped - 7 lines]
>PPTools:  www.pptools.com
>================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.