benpollinger
Technical User
Hello all,
I have a Word 97 template for a simple report on an individual.
The fields are 'Name', 'Surname' and 'DOB' (date of birth)
I have set a macro as follows using ASK and FILLIN fields, which stores the inputs into bookmarks.
As per the Word help file, I have made a macro to prompt for these inputs when a new document is made. The macro is simply:
Sub AutoNew()
Selection.WholeStory
Selection.Fields.Update
Selection.HomeKey Unit:=wdStory
End Sub
This works fine, but I would like to use the fields in a header. This macro does not update headers, and I cannot record selecting and updating header contents in by using 'record macro'.
Can anyone suggest macro code that would do this? I don't really know VBA, but all it would need (I think) is to add these actions to the above:
view header
select header contents
update fields
view main
home
Slightly complicated by the fact that the first page has no header, i.e. the First Page header is empty.
Thanks everyone (anyone?!),
Ben
I have a Word 97 template for a simple report on an individual.
The fields are 'Name', 'Surname' and 'DOB' (date of birth)
I have set a macro as follows using ASK and FILLIN fields, which stores the inputs into bookmarks.
As per the Word help file, I have made a macro to prompt for these inputs when a new document is made. The macro is simply:
Sub AutoNew()
Selection.WholeStory
Selection.Fields.Update
Selection.HomeKey Unit:=wdStory
End Sub
This works fine, but I would like to use the fields in a header. This macro does not update headers, and I cannot record selecting and updating header contents in by using 'record macro'.
Can anyone suggest macro code that would do this? I don't really know VBA, but all it would need (I think) is to add these actions to the above:
view header
select header contents
update fields
view main
home
Slightly complicated by the fact that the first page has no header, i.e. the First Page header is empty.
Thanks everyone (anyone?!),
Ben