shekhu
03-28-2007, 05:52 AM
This is a macro to save the compared version(with unedited document) of a document that is opended from the server after editing at D:\Edited with prefix "Compared" + active document name. This works fine in Word 99 and 2000, but when I use this macro in 2003, it saves the document at D:\Edited as "Compared + document1" ,i.e., instead of active document name it puts document1. I dont know why, please help me out. :think:
Sub C2()
Dim editedFileFullName As String
ActiveDocument.Save
editedFileFullName = ActiveDocument.FullName
ActiveDocument.Compare Name:="D:\Unedited\" & ActiveDocument.Name
ActiveDocument.SaveAs "D:\Edited\Compared " & ActiveDocument.Name
Documents.Open editedFileFullName
End Sub
Sub C2()
Dim editedFileFullName As String
ActiveDocument.Save
editedFileFullName = ActiveDocument.FullName
ActiveDocument.Compare Name:="D:\Unedited\" & ActiveDocument.Name
ActiveDocument.SaveAs "D:\Edited\Compared " & ActiveDocument.Name
Documents.Open editedFileFullName
End Sub