Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do you show deleted text (print slashed text, etc.)? | Microsoft Word Help | |||
End/FootNote text style | Page Layout | |||
word 2003 cannot correct text. cha. deleted for char. added. even | Microsoft Word Help | |||
How come my backspace key won't deleted highlighted text? | Microsoft Word Help | |||
Word - auto text added that I do not want | Microsoft Word Help |