dear all,
i have macro in excel, refreshes charts in powerpoint presentation, if size of chart not changing. these bar charts , size mean number of bars in chart.
one of charts, has different size after each refresh , macro can't handle that. refreshes many bars in ppt chart, many there in chart in ppt file.
can point me in right direction, how refresh size of chart in ppt?
this macro currently:
-------------------------------
sub updatepowerpoint()
dim ppt powerpoint.application
set ppt = new powerpoint.application
ppt.visible = true
dim currentpresentation object
dim sld powerpoint.slide
dim shp powerpoint.shape
dim mychart powerpoint.chart
set currentpresentation = ppt.presentations.open(path ppt file updated)
each sld in currentpresentation.slides
each shp in sld.shapes
if shp.haschart then
set mychart = shp.chart
mychart.chartdata.activate
mychart.refresh
end if
next
next
ppt.activate
currentpresentation.saveas (path updated file)
currentpresentation.close
ppt.quit
set ppt = nothing
set currentpresentation = nothing
end sub
-------------------------------------
thanks,
[moved from: office/ powerpoint/ other/unknown/ office 2007]
Office / PowerPoint / Microsoft Office Programming / Office 2007
Comments
Post a Comment