【发布时间】:2017-04-07 08:17:47
【问题描述】:
我正在尝试从 excel 打开 word 文档,但在使用以下代码时卡在第一行。我添加了引用仍然得到编译错误 user-defined type not defined。
Dim oApp As Word.Application
Dim oSec As Word.Section
Dim oDoc As Word.Document
Set AppWord = CreateObject("Word.Application")
Set oApp = New Word.Application
Set oDoc = oApp.Documents.Add
【问题讨论】:
-
参考文献中的Word库打勾了吗?
标签: excel vba ms-word user-defined-types