Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2020, 09:58 AM
palain58 palain58 is offline Change Font Italic or normal from one point Windows 10 Change Font Italic or normal from one point Office 2016
Novice
Change Font Italic or normal from one point
 
Join Date: Jan 2020
Posts: 4
palain58 is on a distinguished road
Default Change Font Italic or normal from one point

Many thanks Jeffrey.
I tested today but the macro is blocking under:
.Text = arrParts(1)

and I have to debug

Sub AtTheDateOf()
Dim oRng As Range
Dim arrParts() As String
With Selection


.HomeKey Unit:=wdStory
.Find.Execute FindText:="at the date of [0-9]{2,}.[0-9]{2,}.[0-9]{4,}"
.Expand wdParagraph
Set oRng = .Range
End With
With oRng
arrParts() = Split(.Text, " at the date")
.Text = arrParts(0)
.Font.Bold = True
.Font.Italic = True
.Collapse wdCollapseEnd
.Text = arrParts(1)
.Font.Bold = False
.Font.Italic = False
End With
lbl_Exit:
Exit Sub
End Sub


Here the text I want to adapt each time:

MRI Brain at the date of 10.01.2020

should be written:

MRI Brain : in Italic and Bold (left side of "at the date of")
10.01.2020 : in normal caracters (right size of "at the date of")

But this Title "MRI Brain is changing and the date as well .

Nice regards and many thanks for your help
Reply With Quote
Reply



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 07:46 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