Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2022, 10:27 PM
macropod's Avatar
macropod macropod is offline Wildcards and track changes Windows 10 Wildcards and track changes Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,516
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


You don't need wildcards for this. For example:
Code:
Sub TrackChanges()
Application.ScreenUpdating = False
Dim bTrk As Boolean
With ActiveDocument
  bTrk = .TrackRevisions
  .TrackRevisions = False
  With .Range
    With .Find
      .ClearFormatting
      .Format = False
      .Forward = False
      .Wrap = wdFindStop
      .Text = ""
      .Replacement.Text = ""
      .Font.Underline = True
    End With
    Do While .Find.Execute
      .Font.Underline = False
      .Cut
      ActiveDocument.TrackRevisions = True
      .Paste
      ActiveDocument.TrackRevisions = False
      .Collapse wdCollapseStart
    Loop
  End With
  With .Range
    With .Find
      .ClearFormatting
      .Forward = False
      .Wrap = wdFindStop
      .Font.StrikeThrough = True
    End With
    Do While .Find.Execute
      .Font.StrikeThrough = False
      ActiveDocument.TrackRevisions = True
      .Delete
      ActiveDocument.TrackRevisions = False
      .Collapse wdCollapseStart
    Loop
  End With
  .TrackRevisions = bTrk
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 06-06-2022, 11:10 AM
valentinator valentinator is offline Wildcards and track changes Windows 10 Wildcards and track changes Office 2019
Novice
Wildcards and track changes
 
Join Date: Jun 2022
Posts: 9
valentinator is on a distinguished road
Default Thank you!

Quote:
Originally Posted by macropod View Post
You don't need wildcards for this. For example:
Thank you so much for the help! Sadly, it didn't seem to work for me.
I think you used simple underline and mine is double. I tried tweaking it by myself but I don't know enough coding to make it work.
These are the two formatting options that I would need changed:
- Insertions are un double underline
- Deletions are strikethrough
I know I can leave the replace box empty for the deletions and that will do the trick, my only issue is with the insertions.

Last edited by valentinator; 06-06-2022 at 11:16 AM. Reason: forgot attachments
Reply With Quote
  #3  
Old 06-06-2022, 11:17 AM
valentinator valentinator is offline Wildcards and track changes Windows 10 Wildcards and track changes Office 2019
Novice
Wildcards and track changes
 
Join Date: Jun 2022
Posts: 9
valentinator is on a distinguished road
Default

Attaching formats for reference
Attached Images
File Type: png Insertions.png (27.0 KB, 17 views)
File Type: png Deletions.png (30.7 KB, 17 views)
Reply With Quote
Reply

Tags
formatting, track changes, wildcards



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wildcards and track changes Using wildcards with SEARCH 14spar15 Excel 7 10-14-2020 08:43 AM
Wildcards and track changes Creating PDF in track changes - simple track changes only sophiah81 Word 8 07-19-2018 12:51 AM
Wildcards and track changes Wildcards raghugada Word VBA 3 06-10-2017 01:52 AM
Wildcards Madcat Word 2 12-21-2014 08:27 PM
Wildcards and track changes Track Changes doesn't track Change Case changes wardw Word 3 10-28-2012 05:31 PM

Other Forums: Access Forums

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