Identifying change in document contents 
Author Message
 Identifying change in document contents

Hello All,
    How will I be able to know that there has been a change in the document
content? (eg. addition or deletion of text ,tables ,images etc) .Do I need
to have a timer running through out the instance of word to keep checking
the contents or is there another way to do it?
Any code will be helpful.
Regards,
Reets


Fri, 04 Mar 2005 21:40:11 GMT  
 Identifying change in document contents
Hi Reets,

You can test the .Saved property of the ActiveDocument object. It will return False if the document has changes since it was previously saved.

Hope this helps,
regards,
Astrid

So that all can benefit from the discussion, please post all follow-ups to the newsgroup.
Visit the MVP Word FAQ site at http://www.mvps.org/word/


Quote:
> Hello All,
>     How will I be able to know that there has been a change in the document
> content? (eg. addition or deletion of text ,tables ,images etc) .Do I need
> to have a timer running through out the instance of word to keep checking
> the contents or is there another way to do it?
> Any code will be helpful.
> Regards,
> Reets



Fri, 04 Mar 2005 21:50:01 GMT  
 Identifying change in document contents
Hi Reets,

Here's a snippet from Joel Alley(MS) in a message from
microsoft.public.office.developer.automation

'***********************************************
As for having an event that fired when a page changed, this could be
disasterous.  For example, let's say I've just finished typing "A Tale of
Two Cities"  (I don't know why you'd want to but...) I realize that I
forgot the first paragraph of the novel, so I go back up to the top and
type it in.  However, each keystroke causes the page I'm on to change, so I
get a PageChange event.  Not only that, but quite often as the documented
is repaginated to accomodate my changes, lots of other pages get changed as
well.  Potentially, thousands of PageChange events could get fired in the
course of typing "It was the best of times.  It was the worst of times."

The natural response is that not all changes should cause the event to
fire, but then how do you choose?  Should each character cause a change?
Each word?  Each paragraph?  What about spelling mistakes?  Should a change
on one page that repaginates another cause two events fire?  What if I only
want to monitor changes on page 243?  What if what I'm monitoring moves to
page 244?  As you can see, it gets so muddled so quickly.
'***********************************************

HTH


Quote:
> thanks astrid,
> But I need to do it dynamically!!!!!!!!. ie I should get to know of the
> changes as and when it is happening
> Regards,
> Reets



> Hi Reets,

> You can test the .Saved property of the ActiveDocument object. It will
> return False if the document has changes since it was previously saved.

> Hope this helps,
> regards,
> Astrid

> So that all can benefit from the discussion, please post all follow-ups to
> the newsgroup.
> Visit the MVP Word FAQ site at http://www.mvps.org/word/



> > Hello All,
> >     How will I be able to know that there has been a change in the
> document
> > content? (eg. addition or deletion of text ,tables ,images etc) .Do I
need
> > to have a timer running through out the instance of word to keep
checking
> > the contents or is there another way to do it?
> > Any code will be helpful.
> > Regards,
> > Reets



Sat, 05 Mar 2005 21:55:58 GMT  
 Identifying change in document contents
thanks astrid,
But I need to do it dynamically!!!!!!!!. ie I should get to know of the
changes as and when it is happening
Regards,
Reets


Hi Reets,

You can test the .Saved property of the ActiveDocument object. It will
return False if the document has changes since it was previously saved.

Hope this helps,
regards,
Astrid

So that all can benefit from the discussion, please post all follow-ups to
the newsgroup.
Visit the MVP Word FAQ site at http://www.mvps.org/word/



Quote:
> Hello All,
>     How will I be able to know that there has been a change in the
document
> content? (eg. addition or deletion of text ,tables ,images etc) .Do I need
> to have a timer running through out the instance of word to keep checking
> the contents or is there another way to do it?
> Any code will be helpful.
> Regards,
> Reets



Sat, 05 Mar 2005 21:11:38 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to change contents of drop-down-fields in a lot of documents

2. Best method to copy document contents to new document

3. Identifying forms in 'documents' collection

4. please help - need help on identifying last word in document

5. change contents of boxes after change in combox

6. Identifying and Changing colors

7. Document variable with value that changes throughout the document

8. Identifying which control changed

9. Help Needed with Identifying and changing keyboard language

10. How can I change how Inet identifies itself?

11. Copying content between Word documents using VBScript

12. File Custom Properties and Document Contents

 

 
Powered by phpBB® Forum Software