Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reports to Powerpoint
Message
 
 
To
04/10/2001 17:06:59
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00564521
Message ID:
00564621
Views:
20
>I have several reports that display msgraph charts that my boss wants to put them in a powerpoint presentation. Whats the best way to do this?

The best way to do this is to use Automation to create a PowerPoint presentation, and then cut/paste the MSGraph charts into PowerPoint slides.

The code looks something like this:
* Start by copying your MSGraph data to the clipboard.
* Look for a Copy method in the MSGraph object model.

#DEFINE ppLayoutBlank 12

* Create the PowerPoint object
oPowerPoint = CreateObject("PowerPoint.Application")

* Make it visible, and add the presentation and slides
oPowerPoint.Visible = .T.
oPresentation = oPowerPoint.Presentations.Add()
oSlide = oPresentation.Slides.Add(1, ppLayoutBlank)

* Add the graph to the slide
oSlide.Shapes.Paste()
There's not a lot of documentation on automating PowerPoint out there. There's some good stuff in the MS KB. However, the best source for PowerPoint and working between Office applications is the book Tamar Granor and I wrote: "Microsoft Office Automation with Visual FoxPro." Go to www.hentzenwerke.com. There's a ton of real-world code in there that will help you. I worked on a huge project that needed to generate hundreds of slides with graphs; the chapters are based on the knowledge needed to write that app that is in world-wide use. Much of the code is pared out of libraries that have been pounded on by many users, so it's solid code. The book is available as a CHM file, so you can download it relatively quickly (usually within a business day after ordering it through Hentzenwerke). You'll be able to read it immediately without waiting for the paper book to arrive.

Hope this helps!

- della
Previous
Reply
Map
View

Click here to load this message in the networking platform