Word - How do I show comments without showing tracked changes via code (C#)?

Add-in Express™ Support Service
That's what is more important than anything else

Word - How do I show comments without showing tracked changes via code (C#)?
 
offisync corp




Posts: 52
Joined: 2009-08-27
I'm developing an addin for Word where i need to show comment that are written in the document (from Review menu).
The problem is that I don't want to show the "tracked" changes in the document.

When i modify the Document.ShowRevision property, both comments and tracked changes are shown / hidden.

I know that i can do this via UI by using the "Review -> Show Markup" menu and deselecting all but the "Comments" option but i couldn't find this in the API of the Word Interop dll.

Any ideas?
Posted 18 Jul, 2010 09:02:50 Top
Andrei Smolin


Add-in Express team


Posts: 17232
Joined: 2006-05-11
Hi Lev,

I've recorded the following macro in Word 2007:

Sub Macro1()
'
' Macro1 Macro
'
'
  With ActiveWindow.View
    .ShowRevisionsAndComments = False
    .RevisionsView = wdRevisionsViewFinal
  End With
  WordBasic.ShowMarkupArea
  WordBasic.ShowFormatting
  WordBasic.ShowInsertionsAndDeletions
  WordBasic.ShowInkAnnotations
End Sub


Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 19 Jul, 2010 04:14:11 Top