Field Question

M

maperalia

I have two fields that I have inserted in one file. Both are "Fill-in" one is
located at the top of the page and the other one is located at the bottom of
the page. Both information are the same (name of the person).

Although this name is the same (in the top and the bottom) I have to type it
twice because the macro recognizes it as a two different data. Therefore, the
macro has shown me two windows and I have to type the same information twice.

It is possible to modify the program (see below) in order to get just one
window. Therefore, after I type the name of the person at the top of the page
will automatically type it at the bottom without getting the second windows?

Thanks in advance
Maperalia


‘*******Program Start***********
Option Explicit
Sub FillOutDate()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType < wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
End Sub

‘*******Program End***********
 
D

Doug Robbins

I would use a userform rather than fill-in fields, but with fill-in fields,
you should be able to eliminate the second one by having the first one
inside a bookmark and using a cross reference to the text of the bookmark in
the second location.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

maperalia

Doug;
Thank you very much I have made the setps you adviced me and It is working
wondeful!!!!!!.
In addition, you mentioned that you would use userform instead. Could you
please tell me how I can I do it?

Best regards.
Maperalia
 
C

Charles Kenyon

Or use an ASK field instead, which sets the bookmark.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top