I have two questions. 1 In word I can go to a bookmark "input", but I want to keep that one and paste my selection in a new bookmark one line below this one. I tried .selection.Collapse Direction:=wdCollapseEnd to go to the end and then insertLine but that does not do the trick. Also tried ActiveDocument.Bookmarks.Add "Excel1", newRange before pasting (see commented part of code) but also no luck. 2 When I copy a range from excel to word with DataType:=wdPasteEnhancedMetafile the left border is not visible in word (the other borders are fine. How to add the left border after pasting the metafile Picture ?
' in excel
selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
lWidth = selection.Width
lHeight = selection.Height
wdDoc.Activate
' With wdApp
'' Set prevRange = wrdDoc.Bookmarks("input").Range
' Set newRange = prevRange 'Have to set the range to something initially
' newRange.SetRange prevRange.End, prevRange.End
' ActiveDocument.Bookmarks.Add "Excel1", newRange
'End With
With wdApp
.Visible = True
.selection.Goto What:=wdGoToBookmark, Name:="input"
.selection.Collapse Direction:=wdCollapseEnd
'leave the bookmark input as input and make a new bookmark on next word line for the picture.
.selection.InsertLine
.selection.PasteSpecial Link:=False, DisplayAsIcon:=False, _
DataType:=wdPasteEnhancedMetafile, Placement:=wdInline
'add a line at the left border of metafile ??
'.Selection.InsertAfter Chr(13)
.selection.InsertBreak (wdPageBreak)
End With
nextXL: