![]() |
#6
|
|||
|
|||
![]()
Hi Paul,
Okay I've found something to start with, but can't figure out how to more one past the em dash. Again, I'm going to start with something simple and then try to move on to the bigger task. This code below will allow me to bold the first part of this paragraph all that which is before the em dash. I have one line in my document for starters. ADPE—AUTOMATED DATA PROCESSING EQUIPMENT Running the macro below the .start is 5 and then the .end equals 4 so the paragraph collapses to the first 4 characters and bolds. Not sure how to get the start to be 6 and then proceed to the end and collapse? Code:
Sub Bold_Terms2() With Selection.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "^+" .Replacement.Text = "" .Forward = True .Format = False .MatchWildcards = False .Wrap = wdFindStop .Execute End With Do While .Find.Found If .Find.Found = True Then With .Duplicate .Start = .Paragraphs.First.Range.Start .End = .End - 1 .Font.Bold = True End With .Collapse wdCollapseEnd .Find.Execute End If Loop End With End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
neilfxb | Word | 21 | 02-22-2023 12:47 PM |
Macro that formats (true title) case by Heading style | Marrick13 | Word VBA | 11 | 09-20-2015 06:29 PM |
![]() |
Madanjeet | Word | 6 | 05-18-2015 10:11 AM |
Stop review query when small case at beginning of line | dsrose | Word | 2 | 01-22-2014 12:19 AM |
![]() |
Marrick13 | Word VBA | 14 | 12-11-2013 09:12 PM |