Information générale
Catégorie:
Contrôles ActiveX
Titre:
VB 6 to Word Document
Greetings all,
I open an instance of Word 2000, and activate a document. The Word session stays open until closed. I then do the same event, which first does a getobject, to test whether Word is open, and then open the second document.
Code:
On Error GoTo Start_Word
Set objWord = GetObject(, "Word.Application")
boolWordOpen = True
Start_Word:
On Error Resume Next
If boolWordOpen = False Then
boolWordOpen = True
Set objWord = CreateObject("Word.Application")
End If
cThisFile = clsProXtrnal.FormPath & cViewFile
With objWord
.Visible = True
.Documents.Open (cThisFile)
End With
Problem is it ALWAYS opens another instance of Word. I need Word to open a second document, not another instance. I did not have this problem with Word 97. Any help is appreciated.
Thanks,
Brad
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement