View Full Version : Can Word do this?


Strix
27-01-2006, 16:59
Can Word place text in several places in a document if you type it in in only one location?

(A bit like 'copy cell' in a spreadsheet)

Kristian
27-01-2006, 17:03
Would using 'find and replace' help Strix? Is there some text that needs to be changed, or do you just want the text to be inserted?

Ghozer
27-01-2006, 17:09
You can set up some macros like in excel, using text boxes, in clone mode, not done it for a while tho so couldnt tell you exactly how.

Phanerothyme
27-01-2006, 18:00
Can Word place text in several places in a document if you type it in in only one location?

(A bit like 'copy cell' in a spreadsheet)

apart from headers and footers, I don't think so. You might be able to insert some kind of data object and update that from elsewhere.

What's the problem that needs a solution?

JoeP
27-01-2006, 18:22
Havng done a heck of a lot of Word VBA / Word Object programming in recent years, what you want can be done but does require some code behind the scenes.

If it's something you need to do often, then it might be worth developing a macro for. If it's a 'one off' then you may want to try looking at Search and Replace or Bookmarks.

Joe

Strix
27-01-2006, 21:04
Great! I'm not completely mad then :)

It's a document of 37 pages that combines all the control documents for a project. We would normally write the job number on each of these (or just forget, then lose the documentation :rolleyes: ), so whilst we're collating all this info into one place, I thought we'd be best off making it work

The document is to be used over and over, so it's worth getting it to work properly. I want us to be able to just type the job number into the form on the first page, but for it to repeat itself as necessary thoughout the document.

Which method that you guys have suggested is likely to be most simple to implement and then use?

fnkysknky
28-01-2006, 08:48
You can use fields to do it and it doesn't require any code. One way is to use the document properties to store the job number and then insert it from there, for example.

To set up the document for first use - open your document, go to File -> Properties -> Custom and then in the Name box type a name for the job number placeholder e.g. 'JobNo', for type you can leave it set to text and then type 'Job #'.

Now go through the document and where you want the field to appear go to Insert -> Field and in Field names scroll down to and select DocProperty - in the Property list box you should now be able to select the custom property you created earlier i.e. 'JobNo' - click OK.

It should return you to the document and will have placed the contents of the 'JobNo' property where the cursor was. Now go through the document repeating the insertion of fields where needed.

To change the JobNo property just go back into the document properties and update it. The fields in the document will not update unless you tell them to - you can either do this by clicking on 1 at a time and hitting F9 or by going to Select all in the Edit menu and then hitting F9 to update all at the same time.

That's just one of a number of ways to do it but it's simple and works.

Hope it helps, any probs let us know :)