Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I have searched for an answer and apologize if it already exists...
I am trying to replace words in a document with a field after I have already composed the doc. For example, assume I have written a book about apples, and later decide that I want to substitute the word "apple" with a field, whcih of course can carry the value "apple" or any other fruit I choose to define. Once my book has been written with thousands of literal "apple" words throughout, what's the best way to replace those instances with my new field? I have tried to force find/replace to do this but without success. Thanks to anyone who helps out. Mike |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi Mike,
Here's the simplest way: Create the field. It could be a Ref field pointing to a bookmark, or a DocProperty field pointing to a custom document property (or, less likely, a DocVariable field; you need a macro to set the value of a document variable). Select the field and copy or cut it to the clipboard. Put the cursor at the beginning of the document and open the Replace dialog. In the Find box, enter the word or phrase to replace. In the Replace box, enter the code ^c (or click More, click Special, and select "Clipboard Contents", which inserts the same code). Click the Replace All button. You'll probably have to select all text in the document (Ctrl+A) and update the fields (F9). -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. mbleyle wrote: I have searched for an answer and apologize if it already exists... I am trying to replace words in a document with a field after I have already composed the doc. For example, assume I have written a book about apples, and later decide that I want to substitute the word "apple" with a field, whcih of course can carry the value "apple" or any other fruit I choose to define. Once my book has been written with thousands of literal "apple" words throughout, what's the best way to replace those instances with my new field? I have tried to force find/replace to do this but without success. Thanks to anyone who helps out. Mike |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Jay, thank you so much - that worked like a champ. I really appreciate your
help. "Jay Freedman" wrote: Hi Mike, Here's the simplest way: Create the field. It could be a Ref field pointing to a bookmark, or a DocProperty field pointing to a custom document property (or, less likely, a DocVariable field; you need a macro to set the value of a document variable). Select the field and copy or cut it to the clipboard. Put the cursor at the beginning of the document and open the Replace dialog. In the Find box, enter the word or phrase to replace. In the Replace box, enter the code ^c (or click More, click Special, and select "Clipboard Contents", which inserts the same code). Click the Replace All button. You'll probably have to select all text in the document (Ctrl+A) and update the fields (F9). -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. mbleyle wrote: I have searched for an answer and apologize if it already exists... I am trying to replace words in a document with a field after I have already composed the doc. For example, assume I have written a book about apples, and later decide that I want to substitute the word "apple" with a field, whcih of course can carry the value "apple" or any other fruit I choose to define. Once my book has been written with thousands of literal "apple" words throughout, what's the best way to replace those instances with my new field? I have tried to force find/replace to do this but without success. Thanks to anyone who helps out. Mike |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pasting into a search and replace | New Users | |||
Find/ Replace is auto-capping the words I want to replace with | Microsoft Word Help | |||
In Word, word usage | Microsoft Word Help | |||
redundant words | Microsoft Word Help | |||
Word Count | Microsoft Word Help |