Is the chart selected?
This
PPApp.ActiveWindow.Selection.S*hapeRange.Align msoAlignCenters, True
can be replaced with this
PPApp.ActiveWindow.Selection.sliderange.Shapes.ran ge _
(ppapp.ActiveWindow.Selection.sliderange.Shapes.Co unt).align _
msoAlignCenters, True
Certainly it isn't shorter, but it might help. The PowerPoint object
model is not quite as intuitive as Excel's: no ActiveSlide object, for
example.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
wrote:
Thanks Jon. It works fine;;;except I have trouble with
PPApp.ActiveWindow.Selection.S*hapeRange.Align msoAlignCenters, True
PPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True
It doesn't want to align the chart. I'm sure you know what I should do.
Thank you again.