J
Jim
Hi, there,
When I call word to create a file in VB, I got a
probelm message: "This action cannot be completed because
the other application is busy,choose 'switch to' to
activate the busy application to correct problem", actually
when I run the first time, no problem,but I run it again,
I got this message, though I use "Set moWordDoc =
Nothing " and "Set moWordApp = Nothing"
and "word.application.quit", but I still found a process
called "WINWORD" in the task manager,pls help me,thanks!!!
Source Code:
Dim moWordApp As Word.Application
Dim moWordDoc As Word.Document
Set moWordApp = New Word.Application
moWordApp.Visible = False
With moWordApp
Set moWordDoc = moWordApp.Documents.Add
With moWordDoc.Application.Selection
.InsertFile StandardClausePath + Clsfname
end with
moWordDoc.SaveAs Txt_PolicyClause.Text
moWordDoc.Close (False)
.Quit
End With
Set moWordDoc = Nothing
Set moWordApp = Nothing
word.application.quit
When I call word to create a file in VB, I got a
probelm message: "This action cannot be completed because
the other application is busy,choose 'switch to' to
activate the busy application to correct problem", actually
when I run the first time, no problem,but I run it again,
I got this message, though I use "Set moWordDoc =
Nothing " and "Set moWordApp = Nothing"
and "word.application.quit", but I still found a process
called "WINWORD" in the task manager,pls help me,thanks!!!
Source Code:
Dim moWordApp As Word.Application
Dim moWordDoc As Word.Document
Set moWordApp = New Word.Application
moWordApp.Visible = False
With moWordApp
Set moWordDoc = moWordApp.Documents.Add
With moWordDoc.Application.Selection
.InsertFile StandardClausePath + Clsfname
end with
moWordDoc.SaveAs Txt_PolicyClause.Text
moWordDoc.Close (False)
.Quit
End With
Set moWordDoc = Nothing
Set moWordApp = Nothing
word.application.quit