I am able to insert an Excel chart into a word document, but do not
understand how to set myself up to edit the chart: This is the code I am
trying to use. What do I need to do?

Dim oObject As Object
Dim oInlineShape As InlineShape
Set oObject =
Selection.InlineShapes.AddOLEObject(ClassType:="Excel.Chart.8", FileName:= _
"", LinkToFile:=False, DisplayAsIcon:=False)
Set oInlineShape = oObject.OLEFormat.oObject
With oObject
With .activesheet
'Format the embedded chart.
.ChartArea.Font.Size = 8
.HasLegend = False
.Application.Update
etc, etc.

Re: How to format Excel chart within Word by Ed

Ed
Tue Aug 23 15:52:46 CDT 2005

Bill:

Just a stab in the dark , but I think you might have to actually open an
instance of Excel to avail yourself of the properties and methods for
formatting the chart. You might be better off asking this in the
microsoft.public.excel.programming newsgroup. If you do repeat it there,
send it to both of these groups if you can, and both sides can benefit from
the answers.

Ed

"Bill Sturdevant" <BillSturdevant@discussions.microsoft.com> wrote in
message news:0E8BB098-E512-47FF-8C5D-95EA4C3BDB2C@microsoft.com...
> I am able to insert an Excel chart into a word document, but do not
> understand how to set myself up to edit the chart: This is the code I am
> trying to use. What do I need to do?
>
> Dim oObject As Object
> Dim oInlineShape As InlineShape
> Set oObject =
> Selection.InlineShapes.AddOLEObject(ClassType:="Excel.Chart.8", FileName:=
_
> "", LinkToFile:=False, DisplayAsIcon:=False)
> Set oInlineShape = oObject.OLEFormat.oObject
> With oObject
> With .activesheet
> 'Format the embedded chart.
> .ChartArea.Font.Size = 8
> .HasLegend = False
> .Application.Update
> etc, etc.



Re: How to format Excel chart within Word by Cindy

Cindy
Wed Aug 24 03:06:59 CDT 2005

Hi =?Utf-8?B?QmlsbCBTdHVyZGV2YW50?=,

> I am able to insert an Excel chart into a word document, but do not
> understand how to set myself up to edit the chart: This is the code I am
> trying to use. What do I need to do?
>
You're very, very close :-) Set up an object variable to contain the