Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2022, 04:45 PM
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
Red face Wildcards and track changes

Hello! I'm sorry in advance if this is not the right place to post question. I'm having this issue:



I have a client that sends me documents to update, but sometimes they don't use track changes, they instead paint and underline the new text and expect me to not miss a thing.

I already have a way of finding that text with find and replace, but I would love to know if there is a way to change that text automatically using wildcards.

My idea would be:
1- Have track changes activated
2- Find any instance of a word, number or symbol that is formatted in a certain way (e.g., blue color and double underline)
3- Replace that text with the exact same text, but have it show with track changes

I have tried several ways with wildcards but I'm not that advanced yet and can't seem to hit the right string.

I would love any advice!!
Reply With Quote
  #2  
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: 21,962
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
  #3  
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
  #4  
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, 15 views)
File Type: png Deletions.png (30.7 KB, 15 views)
Reply With Quote
  #5  
Old 06-06-2022, 04:01 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: 21,962
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

Simply change:
.Font.Underline = True
to:
.Font.Underline = wdUnderlineDouble
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 06-06-2022, 09:19 PM
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

Quote:
Originally Posted by macropod View Post
Simply change:
.Font.Underline = True
to:
.Font.Underline = wdUnderlineDouble
That's what I tried doing, but it tells me I can't paste selection into a table. Is there a way of working around this?
Reply With Quote
  #7  
Old 06-07-2022, 03:36 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: 21,962
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

Evidently, you have more than the simple addition/deletion of text going on. Without actually seeing the problem document, it can be difficult for anyone to diagnose the issue. Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 06-08-2022, 11:51 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

I was finally able to solve it. I wasn't removing the = True in the last line and that was causing the issue.
Thank you for your help!
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 05:36 AM.


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