Dynamically Generating Graphics during presentation

J

John

I've sourced some audience response collection devices that use
infrared technology and result in a csv file from which I want to
extract data, and graph, all without leaving powerpoint pres. mode. Is
this possible?

I have taken the following steps:
1. Parse the CSV file with VBA, and extracted the vital info.
2. Automatically updated a Excel Chart (in a separate XLS) using a
macro.
3. Linked that Excel Chart in the PPT file.

Can I write code to update the excel chart link and call the macro
that will in turn update the chart. Can this be done without leaving
presentation mode.

Cheers

John Rowland
University of Tasmania
 
T

Tushar Mehta

[This followup was posted to microsoft.public.powerpoint with an email
copy to John.
Please use the newsgroup for further discussion.]

The following should give you an idea of how to accomplish the goal.
As written, it needs some serious performance and object selection
cleanup.

Enter the macro below in a standard module. For the embedded linked XL
chart, set: Action Settings... | Mouse Click tab | Run macro option to
'testIt' (w/o the quotes).

Option Explicit

Sub testIt()
Dim x As Slide, y As Shape, myApp As Object
On Error GoTo ErrXIT
Set myApp = GetObject(, "Excel.Application")
myApp.calculate
Set x = ActivePresentation.SlideShowWindow.View.Slide
Set y = x.Shapes(x.Shapes.Count)
If y.Type = msoLinkedOLEObject Then y.LinkFormat.Update
Exit Sub
ErrXIT:
MsgBox Err.Description & ", " & Err.Source
End Sub

If you want to run a macro in XL, use myApp.Run "<macro name>" (the
quotes are required) after the Set myApp = and before the
myApp.Calculate.

For more search the google.com archives of the PP NG. Something like
the foll. that is restricted to discussions in which I participated:
http://groups.google.com/groups?as_q=update powerpoint%
20excel&safe=off&ie=UTF-8&oe=UTF-8
&as_ugroup=*powerpoint*&as_uauthors=tushar%20&lr=&num=100&hl=en

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

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