MS Word - VBA into Header or Footer (and into a table in the same)
Is there a way to allow gain access to a header or footer in Word via VBA?
I have a one page form full of tables (Page 1) and the narrative begins on
Page 2. There is a header and footer on page 2 and subsequent pages (but not
on page 1). The header and footer have tables and I need to be able to
bookmark the tables somehow and copy certain data from page 1 to this header
and footer.
As I see it, there are two ways to do it:
#1 Use a VBA â??prompt boxâ?? (UserForm) for the data to be captured and force
the data into the header for footer as well as certain fields on Page 1.
OR
#2 Have a macro run on a Text Form Field "EXIT" which automatically COPIES
and PASTES data from Page 1 to the header & footer on Page 2
I have tried where â??tblLastFirstMiddleâ?? is the Form Text Field / Bookmark
and vLastFirstMiddle is the text box control on VBA UserForm.
ActiveDocument.FormFields("tblLastFirstMiddle").Result =
vLastFirstMiddle.Value
This works fine for Page 1 but I have yet to be able to (1) manually place a
bookmark / text form field in an already created header or footer and (2)
call that bookmark in the header or footer and (3) Copy and Paste the data
into it.
Any suggestions?