![]() |
|
#1
|
||||
|
||||
![]()
This modification to Graham's code would include the footnotes and other document storyranges.
Code:
Sub Demo() Const strList As String = ".|,|:|;|?|!" Dim vChar As Variant Dim i As Long Dim oRng As Range vChar = Split(strList, "|") For i = LBound(vChar) To UBound(vChar) For Each oRng In ActiveDocument.StoryRanges With oRng.Find Do While .Execute(vChar(i)) oRng.Start = oRng.Start - 1 If oRng.Characters(1).Font.Italic = True Then oRng.Font.Italic = True End If oRng.Collapse 0 Loop End With Next oRng Next i lbl_Exit: Exit Sub End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
![]() |
Tags |
find, italics, msword, punctuation |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
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 |
![]() |
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 |
![]() |
cornettd | PowerPoint | 1 | 05-10-2010 10:07 AM |