Article ID: 173288
Article Last Modified on 10/11/2006
Sub UpdateAllGraphs()
Dim oShape As Shape
Dim oSlide As Slide
Dim oGraph As Object
'
' Loop through each slide in the presentation.
'
For Each oSlide In ActivePresentation.Slides
'
' Loop through all the shapes on the current slide.
'
For Each oShape In oSlide.Shapes
'
' Check whether the shape is an OLE object.
'
If oShape.Type = msoEmbeddedOLEObject Then
'
' Check whether the OLE object is a Graph 8 object.
'
If oShape.OLEFormat.ProgID = "MSGraph.Chart.8" Then
'
' Found a graph; obtain object reference, and
' then update.
'
Set oGraph = oShape.OLEFormat.Object
oGraph.Application.Update
'
' Now, quit out of the MSGraph program. This frees
' memory, and prevents any problems. Also, set oGraph equal
' to Nothing to release the object.
'
oGraph.Application.Quit
Set oGraph = Nothing
End If
End If
Next oShape
Next oSlide
End Sub
176476 OFF: Office Assistant Not Answering Visual Basic Questions
173707 OFF97: How to Run Sample Code from Knowledge Base Articles
163188 PPT: Sample VB Code to Create a Graph on a Slide
Additional query words: macro code vbe graph97 8.0 graph vba ppt ppt97 graph8 offvba kbcode kbmacro macppt mac_ppt ppt98 98 powerpt
Keywords: kbcode kbdtacode kbhowto KB173288