editing embeded chart in word 2000

B

Bob

How do you "justify the chart title" of an excel chart
embedded in word 2000? The following code does some of
the properties but not the title.
/***********************************/
For chart = 1 To ActiveDocument.Shapes.Count

ActiveDocument.Shapes(chart).Select
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 6#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
 
C

Cindy M -WordMVP-

Hi Bob,

You have to get into the guts of the embedded object. What
you're doing is just working with the container that
displays the object in Word. You have to activate the
object as an Excel chart, then use Excel automation on it.
Very roughly:

Dim cht as Excel.Chart
Dim o as Word.OLEFormat

Set o = ActiveDocument.Shapes(1).OleFormat
Set cht = o.DoVerb(wdOLEVerbOpen)
With cht
. 'Use appropriate Excel commands here
End With

cht.Application.Quit
Set cht = Nothing
Set o = Nothing

Since you want to do this in a loop, you have little choice
than to open these in a separate Excel window. If you
don't, Word is eventually going to crash because you have
no way to properly release each Excel object you're
activating.
How do you "justify the chart title" of an excel chart
embedded in word 2000? The following code does some of
the properties but not the title.
/***********************************/
For chart = 1 To ActiveDocument.Shapes.Count

ActiveDocument.Shapes(chart).Select
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 6#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
.
.
.
**************************************************/
chart title is not a property of the ShapeRange obj.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top