I suppose you know that to make these commands work from within VB you need to precede all Word command by the Word.Document object.
Main Topics
Browse All TopicsHi there.
I just can't seem to find any decent documentation. I have a word document. In this document there is a bit of text, say
[[Surname]]
What I want to do through Word Automation is to find that bit of text, and then replace it with a Form Field.
How does one go about doing *that*?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
for good documenations for word automation
look at
http://www.microsoft.com/o
Excuse me people, but why would one record a macro except for learning how certain obscure command are hidden inside Office VBA applications?
For the kind of Task Pino is after here, (the use of the Formfields.Result property is the only viable one for filling out formfields), the correct property cannot be recorded by a macro.
It is good to use it, but in the end you'll need to twist the generated code around and reuse it in a right and efficient way.
Hi caraf_g,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept calacuccia's comment(s) as an answer.
caraf_g, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
acperkins, if I were to put myself in Dan's position I would have the decency not to sign comments like the above with an official-looking "EE Signature". It pisses me off.
Anyway - because there certainly are no hard feelings toward calacuccia I've increased the points to 200 and I've awarded the Q to him.
;P
Business Accounts
Answer for Membership
by: calacucciaPosted on 2002-08-22 at 04:53:09ID: 7235750
Hi Pino,
election.R ange, wdFieldFormTextInput)
Some advise from a VB amateur, and an Office amateur:
Try this:
Sub Find_en_make_ff_voorPino()
Dim myFF As FormField
Selection.HomeKey wdStory
With Selection.Find
.Text = "Surname"
.Execute
End With
Set myFF = Selection.FormFields.Add(S
myFF.Result = "Surname"
End Sub
I'll leave eventual argument functionality to your imagination.