Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lauching Word from VB exe.
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00454374
Message ID:
00454486
Vues:
19
Hi,
thanks for your input.
After much soul searching, I came up with the following, which works!

Private Sub Merge_Click()

Dim retVal
'Check to see if a Template has been highlighted
If WordTemplates.Text = "" Then
MsgBox "You must highlight a template"
Exit Sub
'If a template has been chosen launch the Word app
ElseIf WordTemplates.Text <> "" Then _
retVal = Shell("C:\program files\microsoft office\office\winword.exe", vbMaximizedFocus)

'Open the chosen template
Documents.Open "C:\client\friendsprovident\" & WordTemplates.Text

'Goto the section of code that performs the merge
Merge1
End If
End
End Sub

Now my problem is to perform the merge.
I can establish an ADO connection to the SQL DB and retrieve the appropriate fields, question is how do I get this data into word.
Can I create fields that users can place within the document?

All ideas gratefully received.
Just because you can't see it, doesn't mean it's not there!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform