# 如何呼叫Word之后, 无法在Word的Bookmark之后插入日期..

Posted by Juan on July 19, 1999 at 10:37:36:

程式如下, 但是在Select部份总是出现"必须是变数或是函数"的编译错误..
可否请先进帮忙修正一下程式错误的地方..

Private Sub Label3_Click()
Dim objWordApp As Word.Application
Dim objDocument As Word.Document
Dim mySelect As Word.Bookmark

MsgBox "发出信函向对方要求专利说明书", vbOKOnly
''呼叫Word
Set objWordApp = CreateObject("Word.Application")
objWordApp.Documents.Open ("C:\IMachine\Doc\A.Doc")
objWordApp.Visible = True
''
Set mySelect = CreateObject("Word.Bookmark")
Set mySelect = objDocument.Bookmarks("ADate").Select
mySelect.InsertAfter Date

Me.Hide
Set objWordApp = Nothing
Set objDocument = Nothing
Set mySelect = Nothing
End Sub

Follow Ups: