Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #15  
Old 01-12-2020, 05:29 PM
gmaxey gmaxey is online now Change Font Italic or normal from one point Windows 10 Change Font Italic or normal from one point Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

You are never going to get anything to work if you are going to continue to move the goal posts!!! The text "in the date of" is not present in the sample document you sent. In addition, that document has content controls so the search string used previously just isn't going to work.

Try this:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
Dim oRngP As Range
Dim arrParts() As String
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = " né(e) le "
While .Execute
With oRng
Set oRngP = oRng.Duplicate
oRngP.Expand wdParagraph
oRngP.End = oRng.Start
With oRngP
.Font.Bold = True
.Font.Italic = True
End With
oRng.Collapse wdCollapseEnd
End With
Wend
End With
lbl_Exit:
Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
PowerPoint macro to change words between quotes to italic needed KarenK13 PowerPoint 9 01-12-2020 12:59 PM
Change Font Italic or normal from one point Font will not lose Italic. Corruption? Ulodesk Word 2 07-25-2016 06:01 AM
Opening doc in Word 2010 causes normal template to change - font size incorrect Simonb Word 4 01-26-2016 03:52 PM
Change Font Italic or normal from one point Help with drop down menu changing Italic font when unlinked brent chadwick Word VBA 3 11-24-2015 12:48 PM
Change Font Italic or normal from one point Change font & point size? markg2 Outlook 2 06-09-2010 03:23 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft