Hi =?Utf-8?B?R2FyeQ==?=,
I have several linked Excel charts in a word document. I would like to
loop through each chart and apply the following sizing statement:
Selection.ShapeRange.ScaleWidth 0.90, msoFalse, msoScaleFromBottomRight
Does anyone have a snipit of code that loops through each linked Excel chart in a document?
Basically, you'd use
For Each shp in ActiveDocument.Shapes
shp.ScaleWidth 'ect.
next shp
But if your document might have other graphical objects with text flow
formatting, then you'd want to check a couple of other things:
1. Is the shp.type = msoEmbeddedOLEObject
2. If yes, is the shp.OLEFormat.Class = "Excel.Chart.8"
Note: Excel.Chart.8 should work for Office 97 through 2003, since the basic
format has not changed. But you may want to check if this is the class being
used in your documents: MsgBox shp.OLEFormat.Class will tell you.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail