Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Chip Orange
 
Posts: n/a
Default modifying all TC field codes to decrease their outline level

We have a need to take a document full of TC field codes, and with an
autoopen macro, have them all decrease their outline level indication (so
that a level one TC field becomes level 2, etc.).

Does anyone know of an example or easy way to do this (other than the
obvious one of writing a macro to process all fields in the doc, looking for
TC field codes, parsing out the level indication, modifying it, recreating
the field, etc.).

Thanks.

Chip



  #2   Report Post  
Posted to microsoft.public.word.tables
Jezebel
 
Posts: n/a
Default modifying all TC field codes to decrease their outline level

You can do it using Find and Replace instructions. Try this manually until
you're comfortable with what's going on, then code it as your macro --

1. Dispay hidden text and field codes, so the TC fields are visible.

2. For each TC level, starting with the highest that might be used in the
document and working backwards (eg 4, then 3, 2, 1) --

-- use Find and Replace with 'Use wildcards' checked

-- search for: (TC*\\l @)4 (open-bracket TC asterisk slash slash
ell space @ close-bracket level-number)
-- replace with: \15 (slash one level-number-plus-one)


You could put this into a loop --

For pIndex = 5 to 1 step -1

pSearch = "(TC*\\l @)" & pIndex
pReplace = "\1" & pIndex + 1

....

Next






"Chip Orange" wrote in message
...
We have a need to take a document full of TC field codes, and with an
autoopen macro, have them all decrease their outline level indication (so
that a level one TC field becomes level 2, etc.).

Does anyone know of an example or easy way to do this (other than the
obvious one of writing a macro to process all fields in the doc, looking
for TC field codes, parsing out the level indication, modifying it,
recreating the field, etc.).

Thanks.

Chip





  #3   Report Post  
Posted to microsoft.public.word.tables
Chip Orange
 
Posts: n/a
Default modifying all TC field codes to decrease their outline level

Thanks very much; just the kind of idea that I was thinking would be out
here somewhere. I need to study up a bit on the search/replace syntax to
understand this, but the idea of it in a loop seems a whole lot more
reliable than my trying to parse each field code myself.

Thanks again.

Chip


"Jezebel" wrote in message
...
You can do it using Find and Replace instructions. Try this manually until
you're comfortable with what's going on, then code it as your macro --

1. Dispay hidden text and field codes, so the TC fields are visible.

2. For each TC level, starting with the highest that might be used in the
document and working backwards (eg 4, then 3, 2, 1) --

-- use Find and Replace with 'Use wildcards' checked

-- search for: (TC*\\l @)4 (open-bracket TC asterisk slash
slash ell space @ close-bracket level-number)
-- replace with: \15 (slash one
level-number-plus-one)


You could put this into a loop --

For pIndex = 5 to 1 step -1

pSearch = "(TC*\\l @)" & pIndex
pReplace = "\1" & pIndex + 1

....

Next






"Chip Orange" wrote in message
...
We have a need to take a document full of TC field codes, and with an
autoopen macro, have them all decrease their outline level indication (so
that a level one TC field becomes level 2, etc.).

Does anyone know of an example or easy way to do this (other than the
obvious one of writing a macro to process all fields in the doc, looking
for TC field codes, parsing out the level indication, modifying it,
recreating the field, etc.).

Thanks.

Chip







Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Customize Outline Numbered List box question Soccerman58 New Users 9 January 17th 06 06:17 PM
Secondary page numbering using field codes Jerry Microsoft Word Help 2 January 14th 06 10:13 AM
Multiple Outline Numbering Priya Page Layout 3 December 28th 05 10:04 AM
Index field codes appear even when Hidden Text is turned off kscott25 Microsoft Word Help 3 May 10th 05 05:21 PM
Field Codes Meryl Microsoft Word Help 1 February 21st 05 07:07 AM


All times are GMT +1. The time now is 07:09 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"