Deleted text

D

dsc

Is there any way to test if text is market as deleted by track changes when
doing a "replace all" from a VBA macro?

Thanks for any assistance.
 
H

Helmut Weber

Hi,
how about this one?
Public Function HasDeletions(oDcm As Document) As Boolean
Dim oRvs As Revision
HasDeletions = False
If oDcm.Revisions.Count > 0 Then
For Each oRvs In oDcm.Revisions
If oRvs.Type = wdRevisionDelete Then
HasDeletions = True
Exit Function
End If
Next
End If
End Function
'---
Sub Test651()
MsgBox HasDeletions(ActiveDocument)
End Sub
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top