Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-29-2023, 12:28 PM
ctviggen ctviggen is offline In a macro to clean up language, what functions do "ClearFormatting" and "Replacement" serve? Windows 10 In a macro to clean up language, what functions do "ClearFormatting" and "Replacement" serve? Office 2016
Advanced Beginner
In a macro to clean up language, what functions do "ClearFormatting" and "Replacement" serve?
 
Join Date: Feb 2021
Posts: 54
ctviggen is on a distinguished road
Default In a macro to clean up language, what functions do "ClearFormatting" and "Replacement" serve?

I have a macro I've been using that cleans up documents. For instance, for the sentence "This is like X i.e. which is like Y", my macro adds commas before and after "i.e.": "This is like X, i.e., which is like Y".



This macro has the following code at the beginning:

Code:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
I have determined what "ClearFormatting" does, but why do I have two statements in a row like this, and what does "Replacement" add?

(The macro works fine, but I added something before these lines, and went to comment these lines...only to realize I'm not sure what they do.)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003: VBA "Function" causes "#VALUE!" errors after running "insert/delete row" custom macro Matt C Excel Programming 2 01-08-2022 06:03 AM
In a macro to clean up language, what functions do "ClearFormatting" and "Replacement" serve? Creating a "super macro" with all kind of functions Xanthopteryx PowerPoint 1 06-16-2016 01:38 AM
How to send "clean" copy after tracking/ redlining changes in review mode lindapaul Word 2 06-09-2016 02:34 PM
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas jocke321 Word VBA 2 12-10-2014 11:27 AM
In a macro to clean up language, what functions do "ClearFormatting" and "Replacement" serve? How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:48 AM.


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