Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-30-2020, 09:29 AM
alex100 alex100 is offline Find and replace all the text flagged with the 'wdDeletedTextMarkStrikeThrough' property Windows 7 64bit Find and replace all the text flagged with the 'wdDeletedTextMarkStrikeThrough' property Office 2016
Advanced Beginner
Find and replace all the text flagged with the 'wdDeletedTextMarkStrikeThrough' property
 
Join Date: May 2020
Posts: 79
alex100 is on a distinguished road
Default Find and replace all the text flagged with the 'wdDeletedTextMarkStrikeThrough' property

Is there a way to search and replace all the text that's flagged with the 'wdDeletedTextMarkStrikeThrough' property?



I tried the code below, but it doesn't work...

Code:
  With ActiveDocument.Content.Find
    .ClearFormatting
    .Font.DeletedTextMark = wdDeletedTextMarkStrikeThrough
    With .Replacement
        .ClearFormatting
        .Font.ColorIndex = wdRed
    End With
    .Execute FindText:="", ReplaceWith:="", Format:=True, Replace:=wdReplaceAll
  End With
Once it has been marked in red, I'd like to reject all the document revisions, so that the text will not get deleted. The following code line seems to work fine:

Code:
     ActiveDocument.RejectAllRevisions
Thank you!

Alex
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to find text, replace with multiple lines of text noslenwerd Word VBA 3 12-31-2019 11:04 AM
Find and replace all the text flagged with the 'wdDeletedTextMarkStrikeThrough' property Find and replace text with wildcards arunchandar9 Word VBA 15 06-30-2019 01:06 AM
Find and replace all the text flagged with the 'wdDeletedTextMarkStrikeThrough' property Macro to find text and replace with form field containing that text iiiiifffff Word VBA 16 06-04-2016 01:47 AM
Macro to find coloured text and replace with form-field/formtext containing that text tarktran Word VBA 1 11-26-2014 08:12 AM
Find and replace all the text flagged with the 'wdDeletedTextMarkStrikeThrough' property Find and replace a string of text errtu Word 1 01-31-2013 02:09 PM

Other Forums: Access Forums

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