Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating chart shapes / objects in powerpoint by page

Status
Not open for further replies.

RodP

Programmer
Jan 9, 2001
109
GB
Hi Everyone,

I have on a weekly basis (!) numerous powerpoint presentation to update. For each one there are about 50-70 pages with 2-3 powerpoint charts on each page! When you double click on them a data sheet window appears and the data (that comes from excel) is refreshed.

I then simply click away back into the main body of the document and the graph is displayed having been refreshed.

As there are so many graphs I'd like to be able to refresh these charts by a click of a button which would refresh just the charts on the page that I am on (in order so that I can scan for changes during the refresh). Is there a way to do all this through vb and limit it by what page you are on?

So far I've looked around tek-tip and have tried recording a macro but it doesn't really tell me much, (What does the DoVerb bit do?) nor am I sure how to determine the names of the charts on the current page.

ActiveWindow.Selection.SlideRange.Shapes("Object 8").Select
ActiveWindow.Selection.ShapeRange.OLEFormat.DoVerb Index:=1
ActiveWindow.Selection.Unselect

Many thanks in advance for your help

Cheers

RodP

 


Rod,

You can loop thru the Slides in your Presentation and update the link on each Chart...
Code:
for each sld in ActivePresentation.Slides
  for each shp in sld.shapes
    if shp.type = msolinkedoleobject then
      'update the link 
    end if
  next
next
I am experiencing application freeze -- I can't tell what the syntax of the update would be. Use your Watch window to figure it out -- put a break in and add a watch window.


Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top