Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-13-2023, 03:18 AM
syl3786 syl3786 is offline Simple issue: formatting mroe than one text just using one module Windows 10 Simple issue: formatting mroe than one text just using one module Office 2019
Advanced Beginner
Simple issue: formatting mroe than one text just using one module
 
Join Date: Jan 2023
Posts: 97
syl3786 is on a distinguished road
Default

Quote:
Originally Posted by vivka View Post
Hi, try this:
Code:
Sub formatting()

  Selection.Find.ClearFormatting
  Selection.Find.Replacement.ClearFormatting
  Selection.Find.Replacement.Font.Italic = True
  With Selection.Find
    .Text = "et al"
    .Forward = True
    .Wrap = wdFindContinue
    .MatchCase = True
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute Replace:=wdReplaceAll
    .Text = "Apple"
    .Execute Replace:=wdReplaceAll
  End With
End Sub

It works well! Many thanks for your help!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Standard Module, Class Module and UserForm jpl Word VBA 0 03-14-2022 07:20 AM
So simple, it may be hard to explain... (mouse issue) Jonesey Excel 1 07-03-2020 11:30 AM
Simple issue: formatting mroe than one text just using one module Restrict Formatting Issue - pasted text changes page size bclear16 Word 6 08-22-2016 11:31 PM
Word Formatting Issue: Space above text when linked to Excel JDHeisenberg Word 3 08-19-2016 05:34 AM
AZWizard Module - ?hidden module pcaldwell Word 1 08-22-2012 01:19 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:16 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