G
ghost01
I have word documents where lot of times need to replace tables fro
excel paste as windows metafile then resize to 70%. The normal method i
very time consupting.
I tried to write a macro which delete the old table (win metafile
InlineShapes), then insert the new table (which is on the clipboard) a
a win metafile (InlineShapes) then resize it.
The macro working until resizing.
Resize is also working if I know the InlineShape ID, but I unable to ge
what is the ID of the actually inserted InlineShape. I have approx. 5
InlineShapes and I replace eg. 10-35 the InlineShapes, but the ID-
always different.
I couldn't find any method to get InlineShape ID in that line where th
cursor stays or get the pasted InlineShape ID.
Here is the macro:
Sub Paste_resize()
Selection.Delete
Selection.PasteSpecial Link:=False, Placement:=wdInLine
DataType:=wdPasteMetafilePicture, DisplayAsIcon:=False
ActiveDocument.InlineShapes(1).ScaleHeight = 70
ActiveDocument.InlineShapes(1).ScaleWidth = 70
End Sub
Have anybody an idea to solving this problem?
Thanks
excel paste as windows metafile then resize to 70%. The normal method i
very time consupting.
I tried to write a macro which delete the old table (win metafile
InlineShapes), then insert the new table (which is on the clipboard) a
a win metafile (InlineShapes) then resize it.
The macro working until resizing.
Resize is also working if I know the InlineShape ID, but I unable to ge
what is the ID of the actually inserted InlineShape. I have approx. 5
InlineShapes and I replace eg. 10-35 the InlineShapes, but the ID-
always different.
I couldn't find any method to get InlineShape ID in that line where th
cursor stays or get the pasted InlineShape ID.
Here is the macro:
Sub Paste_resize()
Selection.Delete
Selection.PasteSpecial Link:=False, Placement:=wdInLine
DataType:=wdPasteMetafilePicture, DisplayAsIcon:=False
ActiveDocument.InlineShapes(1).ScaleHeight = 70
ActiveDocument.InlineShapes(1).ScaleWidth = 70
End Sub
Have anybody an idea to solving this problem?
Thanks