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
> 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
[quoted text clipped - 8 lines]
>
> Chip
Chip Orange - 30 Jan 2006 14:56 GMT
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
> 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 --
[quoted text clipped - 34 lines]
>>
>> Chip