Format EMF after paste

K

Kenton

If I past a graph from Excel in Word as a EMF how do I set the properties of
it?
The following code pats the graph correctly but then gives an error when
formatting it.

Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile,
Placement:=wdInLine, DisplayAsIcon:=False
Selection.ShapeRange.Height = 300
 
J

Jean-Guy Marcil

Kenton said:
If I past a graph from Excel in Word as a EMF how do I set the properties of
it?
The following code pats the graph correctly but then gives an error when
formatting it.

Try this:


Dim inShape As InlineShape

Selection.Range.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, _
Placement:=wdInLine, DisplayAsIcon:=False
Set inShape = Selection.Range.Characters(1).InlineShapes(1)
With inShape
.Height = 200
.Width = 200
'etc.
End With
 

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