Link to home
Start Free TrialLog in
Avatar of JasonLattin
JasonLattin

asked on

How can I repeat (reuse) header text in the document body

I use a macrobutton in the header of a document to identify the spot where a company name should be entered.

I want the entered company name to appear throughout the document body immediately, no updating required.

I have tried using a specific style and a styleref field. The entered text will not appear automatically. Apparently, the styleref field is only effetive when it is used in the header, that is, it only updates automatically when it is in the header and references text in the body.

Is there a way to make text entered in the header at the macrobutton appear throughout the body of the document automatically? I don't want to have to update fields, etc.

I considered a bookmark, but a bookmark is likely to get deleted by accident.

The template I am working on will be used by other people. It's not likely they will be able to handle any manual work for updating any fields.
SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JasonLattin
JasonLattin

ASKER

First, thanks for your help.

I use the macrobutton to mark the spot that the user should type the company name. It looks something like:

<<Click. Type customer name.>>

Clicking the spot selects the text, and typing the name automatically deletes the placeholder text.

It's not a macro in the truest sense of the word. I can't use a true macro because the users may have security enabled that disables macros.

There's more info about the macrobutton here: http://word.mvps.org/FAQs/tblsfldsfms/usingmacrobutton.htm

I have attached the template that I am working on that you can see the macrobutton in use.

My hope is to enter the customer name in the header and have it appear throughout the agenda (see red customer).
As you realise, macrobutton fields were designed to initiate a VBA macro procedure.

In its turn, VBA is there to fill in any gaps that are perceived in the application's functionality.

Because VBA is so powerful, it could be a security risk so there are mechanisms to reduce the risk. Preventing all VBA execution just one of the options available in the Trust centre.  There are others, but you may have to go down the path of having digitally signing macros.

If Word fields had the same level of complexity, they would also be a security risk, and Microsoft would have to design a parallel mechanism to disable them.

Can you consider entering the text directly in the document body, instead of in the header?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Graded as B because I worked on the suggested approach before it was recevied.