You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the readme, the expected PowerShell call syntax is as follows: powershell -File Diff-Word.ps1 oldfile.docx newfile.docx
However, the result is the opposite: Word treats newfile as the original and oldfile as the updated. This is because the Word command Document.Compare expects the syntax NewDocument.Compare(OldDocument, ...) but the PowerShell script uses OldDocument.Compare(NewDocument, ...) which explains the inverted result in Word. Unfortunately the correct syntax is very unclear in the Microsoft documentation so the confusion is quite understandable. However, the PowerShell script should align with the correct use of the Word command.
The text was updated successfully, but these errors were encountered:
Per the readme, the expected PowerShell call syntax is as follows:
powershell -File Diff-Word.ps1 oldfile.docx newfile.docx
However, the result is the opposite: Word treats
newfile
as the original andoldfile
as the updated. This is because the Word commandDocument.Compare
expects the syntaxNewDocument.Compare(OldDocument, ...)
but the PowerShell script usesOldDocument.Compare(NewDocument, ...)
which explains the inverted result in Word. Unfortunately the correct syntax is very unclear in the Microsoft documentation so the confusion is quite understandable. However, the PowerShell script should align with the correct use of the Word command.The text was updated successfully, but these errors were encountered: