A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Word 2007: How to Compare current document?

Thread Tools Display Modes
Old April 27th 11, 07:11 PM posted to microsoft.public.word.docmanagement
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, _
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


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
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 07:01 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.