我想新建一个文档,并在新文档中写入东西,但新文档关闭时,总提示normal.dot在使用,不能关闭。程序代码如下,请高手指点~~~~谢谢!!!
Sub Macro1()
Dim al_dis As Range
Dim AppWord As Word.Application, Wk1 As Word.Document
Set AppWord = CreateObject("word.application")
Set Wk1 = AppWord.Documents.Add
AppWord.Visible = True
'On Error Resume Next
Set al_dis = Wk1.Content
al_dis.Collapse (wdCollapseEnd)
al_dis.InsertAfter (Chr(13) & Chr(13) & Format(Date, "YYYY-MM-DD"))
Set AppWord = Nothing
End Sub
我用的是 office word 2003 sp3