K
KK
Private Sub Start_Click()
ThisWorkbook.Activate
Dim Word As New Word.Application
Set Word = CreateObject("Word.Application")
Word.Visible = True
If (Word.Visible <> True) Then
Word.Visible = True
Else
End If
Dim name, name2 As String
Application.ScreenUpdating = False ' Turn off the screen updating
Application.DisplayAlerts = False
Word.Documents.Open (OfFile), ReadOnly:=True
name = Word.ActiveDocument.name
Word.Documents.Open (rfFile), ReadOnly:=True
name2 = Word.ActiveDocument.name
Word.Activate
Word.Documents(name).Select
Word.CompareDocuments OriginalDocument:=Documents(name), _
RevisedDocument:=Documents(name2), _
Destination:=wdCompareDestinationNew, _
Granularity:=wdGranularityWordLevel, CompareFormatting:=True, _
CompareCaseChanges:=True, CompareWhitespace:=True, CompareTables:=True, _
CompareHeaders:=True, CompareFootnotes:=True, CompareTextboxes:=True, _
CompareFields:=True, CompareComments:=True, CompareMoves:=True, _
RevisedAuthor:="KK", IgnoreAllComparisonWarnings:=False
Word.ActiveWindow.ShowSourceDocuments = wdShowSourceDocumentsBoth
Word.Documents(OfFile).Close
Word.Documents(rfFile).Close
Set Word = Nothing
Application.DisplayAlerts = True
Application.ScreenUpdating = True ' Turn off the screen updating
End Sub
Debug stop at Word.CompareDocuments ,Display the remote server machine does
not exist or is unavailable.
ThisWorkbook.Activate
Dim Word As New Word.Application
Set Word = CreateObject("Word.Application")
Word.Visible = True
If (Word.Visible <> True) Then
Word.Visible = True
Else
End If
Dim name, name2 As String
Application.ScreenUpdating = False ' Turn off the screen updating
Application.DisplayAlerts = False
Word.Documents.Open (OfFile), ReadOnly:=True
name = Word.ActiveDocument.name
Word.Documents.Open (rfFile), ReadOnly:=True
name2 = Word.ActiveDocument.name
Word.Activate
Word.Documents(name).Select
Word.CompareDocuments OriginalDocument:=Documents(name), _
RevisedDocument:=Documents(name2), _
Destination:=wdCompareDestinationNew, _
Granularity:=wdGranularityWordLevel, CompareFormatting:=True, _
CompareCaseChanges:=True, CompareWhitespace:=True, CompareTables:=True, _
CompareHeaders:=True, CompareFootnotes:=True, CompareTextboxes:=True, _
CompareFields:=True, CompareComments:=True, CompareMoves:=True, _
RevisedAuthor:="KK", IgnoreAllComparisonWarnings:=False
Word.ActiveWindow.ShowSourceDocuments = wdShowSourceDocumentsBoth
Word.Documents(OfFile).Close
Word.Documents(rfFile).Close
Set Word = Nothing
Application.DisplayAlerts = True
Application.ScreenUpdating = True ' Turn off the screen updating
End Sub
Debug stop at Word.CompareDocuments ,Display the remote server machine does
not exist or is unavailable.