Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Servers and Word
Message
De
17/02/1999 14:54:19
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00188154
Message ID:
00188595
Vues:
19
Sorry, Pete: I misunderstood you.

Here is code I use to insert text in a Word formfield. FWIW, I much prefer form fields to mergefields. This is from a button on a Word form where users fill in the documents fields. I'm just getting started with VBA myself, but I think there is a collection called MergeFields. But, if you just type in "activedocuments." in a VBA code window, you should see a list of all valid properties and methods for it.

Private Sub CommandButton1_Click()
With UserForm1
ActiveDocument.FormFields(.listFormFields.List(.listFormFields.ListIndex, 1)).Result = .txtField.Value
ActiveDocument.FormFields(.listFormFields.List(.listFormFields.ListIndex, 1)).TextInput.Default = _
ActiveDocument.FormFields(.listFormFields.List(.listFormFields.ListIndex, 1)).Result
UserForm1.listFormFields.SetFocus
End With
End Sub

...snip
>what I don't know how to do is say: mywordfield.value = name
...snip
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform