Sub M()
Dim wdapp As Object, exapp As Object
Selection.MoveDown Unit:=wdLine, Count:=3
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=5, Extend:=wdExtend
Set exapp = CreateObject("Word.Application")
exapp.Visible = True
Set exapp = Workbooks.Open("C:\ex.xls").workSheets("sheet1").Select
Rows("44:3").Copy
wdapp.Documents.Open ("C:\wd.doc")
wdapp.Visible = True
Selection.Paste
End Sub
然后在Rows上报错,编辑错误,子过程或函数未定义
主要代码为:
Sub test()