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***********
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***********