Markup View: PLEASE DIE!

Q

quartz

I am using Office 2003 on Windows XP.

I have a program that copies an MS-Word page from a document that is set to
Markup view.

My program turns Markup off, then copies the page into a new document, saves
the file - with Markup off - and closes it.

However, when the new document is opened, the #@%* Markup view is on again!
Does anyone have a clue as to how I can kill this view permanently when
creating the new document? I have the following function that sets the view:

Private Function WordSetView()
ActiveWindow.View.ShowRevisionsAndComments = False
ActiveDocument.TrackRevisions = False
ActiveDocument.ActiveWindow.View.SeekView = wdSeekMainDocument
ActiveWindow.View.SplitSpecial = wdPaneNone
ActiveWindow.View.Type = wdPrintView
End Function

Please help, I'm frustrated beyond belief.
 
Q

quartz

Thanks Stefan, it still does not work, however, this may be because I am
automating Word from Excel and I'm creating a document template based on the
original document to include the headers and footers.

But it still seems that no matter what I do, I can't get Markup to die. Is
there a way in code to permanently remove all the tracked changes? Can you
please post example code to do so?

Thanks again.
 
R

Russ

Quartz,
Thanks Stefan, it still does not work, however, this may be because I am
automating Word from Excel and I'm creating a document template based on the
You might be creating and saving that aforementioned document template while
trackchanges is set to True, then any new document opened with that template
attached and active in the Word application will open with trackchanges
already set to True. (I didn't test this postulation.) Or maybe some other
template add-in attached to the Word application you're using had its
trackchanges set to True when it was created, saved, and added-in?
 
R

Russ

Quartz,
Thanks Stefan, it still does not work, however, this may be because I am
automating Word from Excel and I'm creating a document template based on the
original document to include the headers and footers.

But it still seems that no matter what I do, I can't get Markup to die. Is
there a way in code to permanently remove all the tracked changes? Can you
please post example code to do so?
If your talking about leftover-unresolved-previously-tracked changes still
showing up, then according to the 'HowTrackChangesWorks' link below, you
must accept or reject them, to get them to disappear. Then turn off track
changes. As far as code you can record a macro while performing that task in
Word or use ActiveDocument.AcceptAllRevisions to accept all changes then
ActiveDocument.TrackRevisions = False to stop any further tracking.
 
S

Stefan Blom

According to the "How to copy text containing tracking changes"
section of the article at
http://www.shaunakelly.com/word/trackchanges/HowTrackChangesWorks.html,
copying from a document where the tracking is ON to a document where
tracking is OFF, should ensure that the target document does not have
track changes activated. But, on the other hand, if you want to
explicitly turn the tracking off, the following simple code should do
the trick:

Dim r As Revision

For Each r In ActiveDocument.Revisions
r.Accept
Next r
ActiveDocument.TrackRevisions = False

--
Stefan Blom
Microsoft Word MVP


in message
 

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