Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Servers and Word
Message
From
17/02/1999 14:54:19
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00188154
Message ID:
00188595
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform