Multiple Acronym Replacements

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Multiple Acronym Replacements

Post by Sundog »

In Word 2007, I have inherited a document with hundreds of acronyms, almost all of which take this form: <definition of acronym> followed by <(acronym)>. Like Standard Operating Procedure (SOP), used everywhere. The rules for acronyms in this document:
  • Create an acronym table of all acronyms and their definitions.
  • Rules for Headings, Figure Captions, and Table Captions: Replace each acronym with only its definition; no acronyms allowed.
  • Rules for running text and table text: Shown below.
  • Define each acronym only once per chapter (12 chapters) at its first use using the form shown above; subsequently in that chapter use the acronym only.
  • If an acronym is only used once in the whole document, use its definition only and delete the acronym there, and delete its line from the Acronym Table.
  • If an acronym is only used once in a chapter, use its definition only and delete the acronym at that location.
This means I need two different Search and Replace strategies, one for running and table text, which use several different styles.; and the second for Headings, Figure Captions, and Table Captions, which are all using standard Word styles. I have sketched out the steps to use, and am wondering if Visual Basic would be of any help. Or am I better off just iterating my steps manually?

Attached is my cumbersome first cut at the steps. Any suggestions welcome.
You do not have the required permissions to view the files attached to this post.
Sundog

User avatar
HansV
Administrator
Posts: 78542
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Multiple Acronym Replacements

Post by HansV »

It might be possible to create a macro to do this but it'd be a lot of work to get it right.

You could perhaps count the occurrences before[/b] replacing the definitions with their acronyms instead of repairing things afterwards.
Best wishes,
Hans

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Re: Multiple Acronym Replacements

Post by Sundog »

Yes, that seems like a good idea. I'll press on manually. Thanks!
Sundog