Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Mega macro with find and replace (HELP!)
Document example:
FISHING This is a great sport. I wish everyone could get into it like many common people have already. Spending days on the water with nothing to show for it but wet clothes and a muddy dog. SURFING A sport that catches the water at it's best. Feel the pain, start today. I have another program that is sending this text to a word document. I can only control the text, not the formatting. I need to create a TOC based upon this doc. The TOC must also have outline number formatting. I have done this in the past with search and replace and formatting. I can's figure a way to change the ALL CAPS words to header 1 with find and replace. I also need a way to pull specific parts of the paragraphs into a header 2 level and include in the TOC. Here is what I need to end up with: 1. FISHING 1.1 nothing to show for it 2. SURFING 2.1 start today I can use markers in the other program to indicate a start and stop character for the search, but can't figure out how to get find and replace to select between start and stop then change format. Any ideas? dan |
#2
|
|||
|
|||
Hi Dan,
You can apply the heading style with two wildcard replacements: Edit Replace, check "Match wildcards", Find what: (^13)([A-Z ]@^13) Replace with: \1h1\2 Find what: \h1\(?) Replace with: \1 ((and Format Style =3D Heading 1)) You could remove the empty paragraphs at the same time, changing the = first replacement to Find what: (^13)[^13]@([A-Z ]@^13)[^13]@ The empty space before/after headings is better done with "Space = before/after" in the heading's style definition. The Word help has something on Find/Replace with "placeholders", or you = can read more about it here if you're interested: http://word.mvps.org/FAQs/General/UsingWildcards.htm To pick up just a small random part of a chapter as a "heading" in the = TOC, you could insert paragraph marks before and after the text, =20 FISHING=C2=B6 This is a great sport. I wish everyone could get into it like many = common=20 people have already. Spending days on the water =C2=B6 with nothing to show for it=C2=B6=20 but wet clothes and a muddy dog.=C2=B6 Then format "with nothing to show for it" in a new paragraph style, say = "TOC_Level2", and pick that up in the TOC: { TOC \h \z \t "Heading 1;1;TOC_Level2;2" } You could apply outline numbering to the TOC styles for the numbers, but = I don't really see the sense in having numbers in the TOC that don't = appear in the main text. Regards, Klaus "DKM" schrieb: Document example: =20 =20 FISHING =20 This is a great sport. I wish everyone could get into it like many = common=20 people have already. Spending days on the water with nothing to show = for it=20 but wet clothes and a muddy dog. =20 SURFING =20 A sport that catches the water at it's best. Feel the pain, start = today. =20 =20 I have another program that is sending this text to a word document. = I can=20 only control the text, not the formatting. I need to create a TOC = based upon=20 this doc. The TOC must also have outline number formatting. I have = done=20 this in the past with search and replace and formatting. I can's = figure a=20 way to change the ALL CAPS words to header 1 with find and replace. I = also=20 need a way to pull specific parts of the paragraphs into a header 2 = level and=20 include in the TOC. =20 Here is what I need to end up with: =20 1. FISHING 1.1 nothing to show for it =20 2. SURFING 2.1 start today =20 I can use markers in the other program to indicate a start and stop=20 character for the search, but can't figure out how to get find and = replace to=20 select between start and stop then change format. Any ideas? =20 dan =20 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace GREEK symbols in XP, 2K & 97 | Microsoft Word Help | |||
Problem with function "Find and Replace" in Word. | Microsoft Word Help | |||
how can I carry out a find and replace within a Word header | Microsoft Word Help | |||
Find and Replace | New Users | |||
Find and Replace anomaly | Microsoft Word Help |