Thanks for your help.
After I generate a TOC I usually unlink it so that I can insert the
section number and a hyphen before the page number. I can't use Word's
built-in option for this since the client does not use auto numbering at
all.
Here's an example of what I am trying to do.
1. Text.......... 1-1
Can someone help me write a macro that will (1) insert a tab, (2) pick up
the first number on that line (i.e., 1), (3) add a hyphen before the page
number.
If it helps, the blank space between the leader tab (set at 6.5) and 1-1
is actually a right-aligned tab set at 7.0.
I currently have to input this information manually throughout the entire
TOC which, as you may have guessed, is a pain when it is 5 pages long.
macropod wrote:
Hi Adelle,For a TOC field, the 'correct' way is to edit the relevant TOC
23-Dec-09
Hi Adelle,
For a TOC field, the 'correct' way is to edit the relevant TOC Styles.
Otherwise the tabs are liable to reappear as soon as you
update the TOC field.
If the tabs are in the headings being picked up by the TOC, though, you
will need to either edit the headings themselves or change the
TOC Style to that the two tabs are effectively treated as one (eg by
placing the corresponding tab stops as close together as
possible - which seems to be about 1.25pts apart).
--
Cheers
macropod
[Microsoft MVP - Word]
Previous Posts In This Thread:
How to search and replace multiple tabs
I am trying to create a macro to search and replace one tab with two in a
TOC. Problem is I currently have three tabs set in the paragraph and the
one that I want to replace is the second tab. When I run the search and
replace it changes the first tab to two. Any ideas on how to get around
this problem.
Ex (current):
1.(tab)text(leader tab)digit
Ex (desired):
1.(tab)text(leader tab)(tab)digit
Hi Adelle,For a TOC field, the 'correct' way is to edit the relevant TOC
Hi Adelle,
For a TOC field, the 'correct' way is to edit the relevant TOC Styles.
Otherwise the tabs are liable to reappear as soon as you
update the TOC field.
If the tabs are in the headings being picked up by the TOC, though, you
will need to either edit the headings themselves or change the
TOC Style to that the two tabs are effectively treated as one (eg by
placing the corresponding tab stops as close together as
possible - which seems to be about 1.25pts apart).
--
Cheers
macropod
[Microsoft MVP - Word]
Macro help!
Thanks for your help.
After I generate a TOC I usually unlink it so that I can insert the
section number and a hyphen before the page number. I can't use Word's
built-in option for this since the client does not use auto numbering at
all.
Here's an example of what I am trying to do.
1. Text.......... 1-1
Can someone help me write a macro that will (1) insert a tab, (2) pick up
the first number on that line (i.e., 1), (3) add a hyphen before the page
number.
If it helps, the blank space between the leader tab (set at 6.5) and 1-1
is actually a right-aligned tab set at 7.0.
I currently have to input this information manually throughout the entire
TOC which, as you may have guessed, is a pain when it is 5 pages long.
Submitted via EggHeadCafe - Software Developer Portal of Choice
Create Hidden SharePoint List for Site Owners
http://www.eggheadcafe.com/tutorial...60-917a85a41b08/create-hidden-sharepoint.aspx