GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ForNeVeR/ExtDiff: Compare documents using MS Word from the command line.

BranchesTags
Open more actions menu

Latest commit

 

History

26 Commits
26 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Diff-Word.ps1
Diff-Word.ps1
 
 
Folder.DotSettings
Folder.DotSettings
 
 
Gui-Diff-Word.ps1
Gui-Diff-Word.ps1
 
 
License.md
License.md
 
 
Readme.md
Readme.md
 
 
diff-word-wrapper.cmd
diff-word-wrapper.cmd
 
 
diff-word.cmd
diff-word.cmd
 
 
start-gui.cmd
start-gui.cmd
 
 

Repository files navigation

ExtDiff Status Aquana

This is a small command line script that will compare two files using Microsoft Word file comparison tool. Microsoft Word will be started using COM automation.

It is useful as a diff tool for Word-related file types.

Using via command line

To run the script, execute it through PowerShell like this:

$ powershell -File Diff-Word.ps1 oldfile.docx newfile.docx

Or via the batch file:

$ diff-word.cmd oldfile.docx newfile.docx

Using the GUI form

UI Form Screenshot

To run the GUI form, run the script start-gui.cmd: it will open a form that stays on top of all the system windows, and you can drag files from Windows Explorer to two text fields (first for the old document, and second for the revised document). When you click the Compare button, it will start Word application with chosen documents as in command line usage, and the form will lose the "stay on top of all windows" behavior. It will regain this property again after the button Clear is clicked.

If you drop multiple files into either box, then the first element will be placed in the box where files are dropped, and the second one into the other box.

Using via Git Integration

You can also use this tool with git, so that git diff will use Microsoft Word to diff *.docx files.

To do this, you must configure your .gitattributes and .gitconfig to support a custom diff tool.

.gitattributes

To configure your .gitattributes, open or create a file called .gitattributes in your git repo's root directory. Add the following text to a new line in this file:

*.docx diff=word

It is also possible to create a global .gitattributes file that will be applied to every repository in a system. To do that, create a file .gitattributes in your home directory, and then perform the following command:

git config --global core.attributesfile ~/.gitattributes

.gitconfig

To configure your .gitconfig, open or create the file in your home directory. Then, add the following to your .gitconfig:

[diff "word"]
	command = <pathToExtDiffFolder>/diff-word-wrapper.cmd

Replace <pathToExtDiffFolder> with the path to this repo's location on disk.


Idea taken from TortoiseSVN diff-doc script.

Additional Documentation

  • License (MIT)
  • Changelog

About

Compare documents using MS Word from the command line.

Topics

diffmicrosoft-wordpowershell

Resources

Readme
MIT license
Activity

Stars

140 stars

Watchers

9 watching

Forks

22 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.