Script Collection
Compare/Diff two word files and create a result PDF | Compare/Diff two word files and create a result PDF |
|
|
|
import win32com.client import time app = win32com.client.Dispatch('Word.Application') # The original document: doc = app.Documents.Open('c:\\temp\\firstversion.doc') # The modified document: ret = doc.Compare('c:\\temp\\newversion.doc') app.ActiveDocument.SaveAs('diff.doc') app.ActiveDocument.ExportAsFixedFormat('diff.pdf', 17, False, 0, 0, 1, 1, 7, True, True, 1, True, True, True) app.ActiveDocument.Close() doc.Close() app.Quit() |
| < Prev | Next > |
|---|
Hint: For syntax highlighting and correct Python intendation place your code between html tags <pre> and </pre>.