Turn off markup in document

G

George F. Rice

I maintain several thousand documents, which track
critical history using "markup view" (as in View ->
Markup). Editors sometimes leave "markup view" on,
sometimes off, when they save a document.

A script performs several "replace" operations across all
documents. However, if "markup view" is on, "replace"
changes the deleted text, destroying history!

I need either a replace option to not change deleted text,
OR a way to turn off "markup view" iff it is on (or,
alternately, a mechanism to determine IF "markup view" is
on).

I tried the statements below, but both act as toggles.
They return nothing indicating the state of "markup view",
as far as I can tell (I threw away my Word 6.0
documentation, silly me).

WordBasic.ViewChanges
WordBasic.ShowInsertionsAndDeletions

I also tried this, but in some cases it only hid the color
of the deleted text, but left the deleted text itself
visible and black (and thus changed by "replace").

For i = 1 To ActiveWindow.View.Reviewers.Count
ActiveWindow.View.Reviewers(Index:=i).Visible = False
Next

I've Googled and called all of the "power users" I know -
none have seen this problem.

Any help greatly appreciated!

George
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi George

ActiveDocument.TrackRevisions returns a Boolean True if Track Revisions is
turned on.

You can turn it on using

ActiveDocument.TrackRevisions = True

or off with

ActiveDocument.TrackRevisions = False

However, if you do not want an Edit Replace to replace deleted text, you may
need to use something like:

Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="quick", MatchWildcards:=False,
Wrap:=wdFindStop, Forward:=True) = True
If Selection.Range.Revisions.Count = 0 Then
Selection.Range.Text = "slow"
End If
Loop
End With


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

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