We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

HasChanges question

Thread ID:

Created:

Updated:

Platform:

Replies:

89982 Sep 12,2009 01:05 PM Sep 15,2009 12:30 AM ASP.NET Web Forms (Classic) 1
loading
Tags: DocIO
David Wier
Asked On September 12, 2009 01:05 PM

I'm doing a replace of text in a doc

However, I don't want to save the file, if there are no actual replacements. My code is this:
doc = New WordDocument(sFilename)
doc.Replace(sOldText, sNewText, GetCase(ck), True)

If doc.HasChanges = True Then
' I save the file here

However, doc.HasChanges always returns FALSE, even after the replacement.

How can I find out if the file has been changed (replacements have been made)?

Vijayakumar S [Syncfusion]
Replied On September 15, 2009 12:30 AM

Hi David,

Thank you for posting your query.

WordDocument.HasChanges property has no effect on changes to the document that you make programmatically via Essential DocIO. The changes that you make via Essential DocIO are never tracked as revisions.

For more information on track changes in the document, please refer the following link

http://help.syncfusion.com/ug_73/docio/TrackingChanges.html

We prepared a sample for your requirement without using WordDocument.HasChanges, could you please have a look at the sample in the below link and let us know if this helps.

http://files.syncfusion.com/support/DocIO.Windows/F89983/89983.zip

Please let us know if you have any questions.

Regards,
Vijay

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;