Sub CopyToWord()
Dim objWord As New Word.Application
'copying the range that I want to paste in Word
With ThisWorkbook.Worksheets("grid_copy")
.Range("b1:AA42").CopyPicture xlScreen
End With
'pasting the picture in a new Word document
With objWord
.Documents.Add
.Selection.Paste
.Selection.ShapeRange.Height = 651
.Selection.ShapeRange.Width = 500
'Those two lines don't work to resize the picture that i'm pasting in word
.Visible = True
End With
End Sub
该代码实际上是有效的,但我无法应用我想要的图像大小。你们知道一种方法可以调整我在 Word 中粘贴的图片的大小,以形成 Excel 中的范围吗?