Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Neitsdelf Neitsdelf is offline
external usenet poster
 
Posts: 1
Default Word 2007: How to Compare current document?

My company just upgraded me to Word 2007 and since I compare documents many times a day, I couldn't live without the old functionality. So I hocked up the following macro to do it the old way (sort of):

Sub LegalBlacklineMyWay()
'by A. Feldstein 4/26/11
Dim fd As FileDialog 'Point to the dialog object
Dim CompareName As String 'Name of doc to compare to, as determined by
Dim WindowTitle As String
Dim CompareDocWasOpen As Boolean
Dim ResultDocument As Document
WindowTitle = "Compare Current Document (My Way)"
If Documents.Count 1 Then MsgBox "No document to compare.", vbInformation, WindowTitle: Exit Sub
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.AllowMultiSelect = False
.ButtonName = "Compare"
'Start in same directory like Word 2003
.InitialFileName = ActiveDocument.Path
.title = WindowTitle
If .Show -1 Then Exit Sub
CompareName = .SelectedItems.Item(1)
CompareDocWasOpen = AlreadyOpen(CompareName)
If Not CompareDocWasOpen Then Documents.Open FileName:=CompareName, Visible:=False
Set ResultDocument = Application.CompareDocuments( _
OriginalDocument:=Documents(CompareName), _
RevisedDocument:=ActiveDocument, _
Destination:=wdCompareDestinationNew, _
Granularity:=wdGranularityCharLevel, _
CompareFormatting:=True, CompareCaseChanges:=True, _
CompareWhitespace:=True, _
CompareTables:=True, _
CompareHeaders:=True, _
CompareFootnotes:=True, _
CompareTextboxes:=True, _
CompareFields:=True, _
CompareComments:=True, _
CompareMoves:=True, _
RevisedAuthor:=Application.UserInitials, _
IgnoreAllComparisonWarnings:=False)
ResultDocument.TrackRevisions = True 'My way
ResultDocument.Saved = False 'My way
If Not CompareDocWasOpen Then Documents(CompareName).Close
End With
Set fd = Nothing
Set ResultDocument = Nothing
End Sub

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
Word 2007: How to Compare current document? Roshan Q Microsoft Word Help 2 February 23rd 10 11:09 PM
Word 2007: How to Compare current document? Roshan Q Microsoft Word Help 0 February 23rd 10 08:38 PM
Word 2007 Freezes doing a document compare 76kgal Microsoft Word Help 0 February 2nd 10 08:10 PM
compare 2 documents highlight changes in 1 document in Word 2007 hopeful Microsoft Word Help 1 November 25th 09 03:43 AM
Word 2007 - change my current document to be based on another template Ardell New Users 3 April 9th 07 05:17 PM


All times are GMT +1. The time now is 01:03 PM.

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"