How can I tell with VB if a document has Markup activated?

C

Chrisso

Hi All

I need to ensure that when our Word files are sent to customers that
"View-Markup" is not selected.

When I record a macro doing this the code is:

WordBasic.ViewChanges

This means that I cannot tell whether Markup was on already. The code
merely toggles.

Is it possible to do a test and turn off Markup only when it is on?

I cannot assume which way each Word file is configured. Some may have
Markup on and others off. Therefore I need a test but with the above
generated code I cannot see a way of doing this.

Any ideas?

Thanks in advance,
Chrisso
 
G

George Lee

Yes, the View-Markup menu item simply toggles the state showing the markup.
The real control is on the Reviewing tool bar with the drop down of the four
view states. Depending which of either of the Final or Original options is
selected, the View-Markup menu item just adds or removes the “Showing Markupâ€
status.

Record a macro with those items and you’ll see that
ActiveWindow.View.RevisionsView, and
ActiveWindow.View.ShowRevisionsAndComments contain the information you want.
So, to send documents out without the revisions showing, set:

ActiveWindow.View.ShowRevisionsAndComments = False

To be sure they see the final version, set also:

ActiveWindow.View.RevisionsView = wdRevisionsViewFinal

Of course, to be sure they can’t see any revisions, clear them out by setting:

ActiveWindow.Document.Range.Revisions.AcceptAll
 
T

Tony Jollans

Whether or not markup is visible is a user setting (on, by default) - not a
document setting. If you don't want other people to see it, you must remove
it.
 

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