Dim App As New MSWord.Application
App.Visible = True
'新建文档
Dim missing = System.Reflection.Missing.Value
Dim Adoc = App.Documents.Add(missing, missing, missing, missing)
Adoc.Activate()
'插入文字
Adoc.Range.Words(1).InsertAfter("hello,foxtable!") '在当前文档中的第一个词后插入"hello,foxtable"
'保存文档
try
Adoc.Save()
Catch
MsgBox(Err.Description)
End Try
'退出word
App.Quit()
你好,我使用您的代码,并且下载引用了插件.
但是执行的时候,出现如下图:

此主题相关图片如下:问题1.jpg