VB 生成 word 的错误提示
采用的是:1:首先建立一个word模板,
2:然后在通过在word版本插入多个书签,把一些Text的内容写进word中
现在程序一运行提示:类型不匹配的错误提示!不知道到底哪里出现错误了。
Private Sub exportToWord_Click()
Dim wdApp As Word.Application
Dim wdDoc As Document
Dim b1 As String, b2 As String
Dim b3 As String, b4 As String
Dim b5 As String, b6 As String
Dim b7 As String, b8 As String
Dim b9 As String, b10 As String
Dim b11 As String, b12 As String
Dim b13 As String, b14 As String
Set wdApp = New Word.Application
Set wdDoc = wdApp.Documents.Open(App.Path + "\" & "报告模板.doc")
wdApp.Visible = True
b1 = txtName.Text
b2 = txtNowline.Text
现在又出现一个错误提示说:word被另一个用户锁定!
[ 本帖最后由 shinesun 于 2014-5-30 13:44 编辑 ]