Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB 6 to Word Document
Message
De
24/07/2000 18:49:50
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Contrôles ActiveX
Titre:
VB 6 to Word Document
Divers
Thread ID:
00396390
Message ID:
00396390
Vues:
32
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
Fil
Voir

Click here to load this message in the networking platform