I have two locations, one has the old files and the other one has the revised files. I am trying to create a vb macro to compare each of these word document and save them in a new location.
I am not able to succeed can somebody help me.
Sub Macro1()
'
' Macro1 Macro
'
Set objWord = CreateObject("Word.Application")
objWord.DisplayAlerts = wdAlertsNone
objWord.Visible = True
Set ORIGINAL = objWord.Documents.Open("S:\Data Management\Oncology Data Management\DataOps\Global Projects\RTF Comparison\Input\old\Profile_10011002.rtf", , False)
Set REVISED = objWord.Documents.Open("S:\Data Management\Oncology Data Management\DataOps\Global Projects\RTF Comparison\Input\new\Profile_10011002.rtf", , False)
Application.CompareDocuments OriginalDocument:=ORIGINAL, _
RevisedDocument:=REVISED, _
Destination:=wdCompareDestinationNew
'ORIGINAL.Close False
'REVISED.Close False
'objWord.Quit
End Sub
I am not able to succeed can somebody help me.
Sub Macro1()
'
' Macro1 Macro
'
Set objWord = CreateObject("Word.Application")
objWord.DisplayAlerts = wdAlertsNone
objWord.Visible = True
Set ORIGINAL = objWord.Documents.Open("S:\Data Management\Oncology Data Management\DataOps\Global Projects\RTF Comparison\Input\old\Profile_10011002.rtf", , False)
Set REVISED = objWord.Documents.Open("S:\Data Management\Oncology Data Management\DataOps\Global Projects\RTF Comparison\Input\new\Profile_10011002.rtf", , False)
Application.CompareDocuments OriginalDocument:=ORIGINAL, _
RevisedDocument:=REVISED, _
Destination:=wdCompareDestinationNew
'ORIGINAL.Close False
'REVISED.Close False
'objWord.Quit
End Sub