I'm not familiar with the 'compare' function in word 2010. Have created a macro to 'unlock read-only form' (compare not available with cursor in editable area and form locked)... then I want to activate the Compare feature for the user. Have
If ActiveDocument.ProtectionType <> wdNoProtection Then
MsgBox "Compare Documents"
ActiveDocument.Compare Name:=<Previous Version> (Here unfortunately, I'm clueless)
MsgBox "Ready to Compare Documents"
Getting error messages and don't know at this point what needs to be changed/added...
Can someone explain how 'compare' needs to be written? Also - once Compare has been initiated and the the user finishes the process. Is the starting document exited. Does the user need to save the document prior to comparing? Obviously - there's a lot to learn!
Regards - Lenny33
Document.Copare method will display revision marks that indicate where the specified document differs from another document.
Below is a simple example:
Sub CompareDocument() ActiveDocument.Compare Name:=" C:\Drafts\PreVersion.docx", CompareTarget:=wdCompareTargetCurrent End Sub
You can place comparison differences in different document through CompareTarget parameter:
- wdCompareTargetCurrent: Places comparison differences in the current document. Default.
- wdCompareTargetNew: Places comparison differences in a new document.
- wdCompareTargetSelected: Places comparison differences in the target document.
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Edited by Jeffrey-Chen'Microsoft employee, Moderator Saturday, August 03, 2013 8:06 AM
- Proposed as answer by Jeffrey-Chen'Microsoft employee, Moderator Friday, August 09, 2013 2:43 AM
- Marked as answer by Fei Xue - MSFTMicrosoft contingent staff, Moderator Sunday, August 11, 2013 3:25 AM