![]() |
|
|
|
#1
|
||||
|
||||
|
The following clumsy modification appears to work Code:
Sub Demo()
Dim rng As Range
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Italic = True
.Text = "*>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
.Collapse wdCollapseEnd
.MoveEnd Unit:=wdCharacter, Count:=1
Debug.Print .Characters(1)
Select Case .Characters(1)
Case ".", ",", ":", ";", "?", "!"
.Characters(1).Font.Italic = True
End Select
.MoveStart wdCharacter, 1
.Find.Execute
Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
| Tags |
| find, italics, msword, punctuation |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to find text and replace with form field containing that text
|
iiiiifffff | Word VBA | 16 | 06-04-2016 01:47 AM |
| Macro to find text in between two characters and then format selected text? | qcom | Word | 5 | 02-19-2015 11:23 PM |
Need help on Macro 03- Find text - if text is blank then remove line
|
simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |
| Objective: Automatically export email text,attachment text to DB friendly format | SilentLee | Outlook | 0 | 11-14-2010 02:45 PM |
Can't print bold or italic text
|
cornettd | PowerPoint | 1 | 05-10-2010 10:07 AM |