我正在将Excel中的范围复制为图像,我想将其插入到word文档中作为虚拟文本“Qwerty01”的替换。现在它打开word文档并将图像粘贴到顶部 - 如何在粘贴之前将光标移动到虚拟文本?
Sub automateword()
Dim sheet1 As Object
Dim wdFind As Object
Set wordapp = CreateObject("word.Application")
wordapp.documents.Open ThisWorkbook.Path & "\Word.docx"
wordapp.Visible = True
Set sheet1 = Sheets("Prog General (1)")
Set wdFind = wordapp.Selection.Find
sheet1.Range("D14:N46").CopyPicture Appearance:=xlScreen, Format:=xlPicture
wdFind.Text = "Qwerty01"
wordapp.Selection.Paste
End Sub