![]() |
|
#1
|
||||
|
||||
![]()
You don't need to bother with a search and replace if you make use of the selection.expand method. For instance, you could add the following in front of the End If line
Code:
Dim oPar As Paragraph For Each oPar In oRng.Paragraphs oPar.Range.Select Selection.Collapse Direction:=wdCollapseStart Selection.Extend " " Selection.Font.Bold = True Next oPar |
#2
|
||||
|
||||
![]() Quote:
Code:
Dim oPar As Paragraph For Each oPar In oRng.Paragraphs With oPar.Range .Collapse Direction:=wdCollapseStart .MoveEndUntil " ", wdForward .Font.Bold = True End With Next oPar
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with VBA script | nsyrax | Word VBA | 1 | 01-18-2014 03:38 AM |
![]() |
TheInfinetGroup | Outlook | 1 | 03-02-2013 07:43 AM |
Add Shared Calendar using script | Antros | Outlook | 0 | 03-15-2012 01:01 PM |
![]() |
ravininave | Word | 1 | 01-05-2011 01:45 PM |
[ask] about VB Script + Ms. Project | anak_baru | Project | 2 | 03-10-2009 01:42 AM |