TrackRevisions method not available error

J

Jeevanantham

Hi,

We are working on word customization using VSTO 2005. In our code for some
functionality we need to enable and disable trackchanges.

for that we are doing something like this,

if (this.TrackRevisions == true)

{

isTrackChangesOn = true;

this.TrackRevisions = false;

}

// Some functionality

if (isTrackChangesOn == true) this.TrackRevisions = true;

The above said is working fine. But when i use Find.. Replace Dialog and try
to replace text within document, the following error is thrown at the line,

if (this.TrackRevisions == true)

"The TrackRevisions method or property is not available because the Find or
Replace dialog box is open."

the stack trace details are

Stack Trace : at
Microsoft.Office.Interop.Word.DocumentClass.get_TrackRevisions()

at Microsoft.Office.Tools.Word.Document.get_TrackRevisions()

Any pointers would be a great help.

Regards,

Jeevanantham
 
W

Word Heretic

G'day Jeevanantham <[email protected]>,

You could be nasty and just do a SendKeys "{esc}" beforehand.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Jeevanantham reckoned:
 

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