D
dave.cuthill
I am creating a chart in excel and then pasting it into word as an
inlineshape but the default size is incorrect. How do I size the object
at the time of pasting - ie. does inlineshapes(1) necessarily select
the pasted object or does it select the first inlineshape? How do I
make sure I am resizing the pasted object?
Here is an extraction ...
Set oWordDoc = ActiveDocument
TabCnt = oWordDoc.Tables.Count
Set Rng = ActiveDocument.Tables(1).Range
Rng.Collapse wdCollapseEnd
Rng.InsertAfter "" & vbCrLf
Rng.Collapse wdCollapseEnd
BMName = "BarChart"
ActiveDocument.Bookmarks.Add Name:=BMName, Range:=Rng
other stuff ...
oGraphChart.ChartArea.Copy
Rng.PasteSpecial Link:=False, DataType:=wdPasteOLEObject, Placement _
:=wdInLine, DisplayAsIcon:=False
inlineshape but the default size is incorrect. How do I size the object
at the time of pasting - ie. does inlineshapes(1) necessarily select
the pasted object or does it select the first inlineshape? How do I
make sure I am resizing the pasted object?
Here is an extraction ...
Set oWordDoc = ActiveDocument
TabCnt = oWordDoc.Tables.Count
Set Rng = ActiveDocument.Tables(1).Range
Rng.Collapse wdCollapseEnd
Rng.InsertAfter "" & vbCrLf
Rng.Collapse wdCollapseEnd
BMName = "BarChart"
ActiveDocument.Bookmarks.Add Name:=BMName, Range:=Rng
other stuff ...
oGraphChart.ChartArea.Copy
Rng.PasteSpecial Link:=False, DataType:=wdPasteOLEObject, Placement _
:=wdInLine, DisplayAsIcon:=False