Reply
 
Thread Tools Display Modes
  #1   Report Post  
TechWriter
 
Posts: n/a
Default How to know what text was edited, added or deleted on a specific date?

I have a document, which has undergone zillions of change. The document
is around 200 pages long. Each change has been tracked with the help of
the Track Change option.

Is there anyway to know what change was made on a specific date. I
don't want to browse through the whole document, placing the mouse
pointer on each paragraph to know when it was changed.

Thanks in advance.

  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default

TechWriter wrote:
I have a document, which has undergone zillions of change. The
document is around 200 pages long. Each change has been tracked with
the help of the Track Change option.

Is there anyway to know what change was made on a specific date. I
don't want to browse through the whole document, placing the mouse
pointer on each paragraph to know when it was changed.

Thanks in advance.


This macro may be a bit of overkill, but try it anyway. :-) It asks for the
date, then creates a separate document with a list of the revisions that
happened on that date (only the page number, line number, and revision
type). Then you can use the GoTo command (Ctrl+G) in the original document
to jump to that location.

Sub TrackByDate()
Dim srcDoc As Document, destDoc As Document
Dim oRev As Revision
Dim strCkDate As String
Dim CkDate As Date
Dim RevType As Variant
RevType = Array("NoRevision", "Insert", "Delete", _
"Property", "ParagraphNumber", "DisplayField", _
"Reconcile", "Conflict", "Style", "Replace", _
"ParagraphProperty", "TableProperty", _
"SectionProperty", "StyleDefinition")

strCkDate = InputBox$("Enter date:")
If strCkDate = "" Then Exit Sub
If Not IsDate(strCkDate) Then Exit Sub

CkDate = CDate(strCkDate)

Set srcDoc = ActiveDocument
Set destDoc = Documents.Add
destDoc.Range.Text = "Revisions in " & _
srcDoc.FullName & " on " & strCkDate & _
vbCr & "Page" & vbTab & "Line" & vbCr & vbCr

For Each oRev In srcDoc.Revisions
If CDate(CLng(oRev.Date)) = CkDate Then
destDoc.Range.InsertAfter _
oRev.Range.Information( _
wdActiveEndAdjustedPageNumber) & _
vbTab & oRev.Range.Information( _
wdFirstCharacterLineNumber) & _
vbTab & RevType(oRev.Type) & vbCr
End If
Next oRev
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org


  #3   Report Post  
TechWriter
 
Posts: n/a
Default

Thanks for the code. But I still think the problem is not solved fully.
I tried to run the macro. It did run once and I got the result. Now it
just gives me an error which says: Run-time error 5852: Requested
object not available. The point to be noted is that even the time when
I got the change details in a new doc, I came across the same error.

Because I didnot actually know how to create a macro, a developer in my
team helped me do it. Now I'm running it from the ToolMacrosRun
route, and that's when I get this error. Any suggestions?

  #4   Report Post  
Jay Freedman
 
Posts: n/a
Default

On 26 Aug 2005 22:52:00 -0700, "TechWriter"
wrote:

Thanks for the code. But I still think the problem is not solved fully.
I tried to run the macro. It did run once and I got the result. Now it
just gives me an error which says: Run-time error 5852: Requested
object not available. The point to be noted is that even the time when
I got the change details in a new doc, I came across the same error.

Because I didnot actually know how to create a macro, a developer in my
team helped me do it. Now I'm running it from the ToolMacrosRun
route, and that's when I get this error. Any suggestions?


I don't see anything obvious in the code that could cause that error,
but that's not unusual. :-)

Could you send me a copy of the document that you're running the macro
on? I'd like to see what data the macro thinks it's working with.
Also, do you have Track Changes turned on or off at the time you run
the macro?

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
  #5   Report Post  
TechWriter
 
Posts: n/a
Default

Sorry, Jay I cannot send you the document. This is a document of the
company that I work for and sending it on mail to any one else would
amount to breaking some rules.

Yes, the Track Changes option is turned on when I run the macro. Also,
I would like to ask how to go about removing that macro and adding it
again. Maybe, that might work. Also, am I running the macro in the
right fashion?
Thanks for your time.



  #6   Report Post  
Jay Freedman
 
Posts: n/a
Default

TechWriter wrote:
Sorry, Jay I cannot send you the document. This is a document of the
company that I work for and sending it on mail to any one else would
amount to breaking some rules.

Yes, the Track Changes option is turned on when I run the macro. Also,
I would like to ask how to go about removing that macro and adding it
again. Maybe, that might work. Also, am I running the macro in the
right fashion?
Thanks for your time.


I've tried to reproduce the error in various ways but I haven't been able to
do it. I've tried with Track Changes turned on or off, with no changes in
the document at all, and in various views including Normal with background
pagination turned off. The darned thing just works. :-)

I very much doubt that removing and readding the macro will do anything
useful, unless there's a typographical error in the current copy. To try
anyway:

- Open the VBA editor (Tools Macro Visual Basic Editor, or shortcut
Alt+F11).
- In the Project pane, expand the icon of the template where the macro is
installed (I presume you used Normal -- if you don't know, ask the person
who helped you before). Under that, expand the Modules icon.
- Double-click the icon of the module that contains the macro.
- In the right-hand part of the editor, select the code of the macro, press
the Delete key, and save.
- Copy the macro code from my original post, and paste it into the editor to
replace the previous code. Save.
- Close the editor.

If you get the error again, it would be useful to me to know which line of
code is highlighted in the editor at that time.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you show deleted text (print slashed text, etc.)? sy levine Microsoft Word Help 1 July 9th 05 05:50 PM
End/FootNote text style Shaun Page Layout 4 July 5th 05 04:36 PM
word 2003 cannot correct text. cha. deleted for char. added. even TopKat Microsoft Word Help 4 July 4th 05 06:48 PM
How come my backspace key won't deleted highlighted text? TechWriter Microsoft Word Help 1 May 17th 05 07:19 PM
Word - auto text added that I do not want Don s Microsoft Word Help 1 April 9th 05 12:55 AM


All times are GMT +1. The time now is 10:37 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"