Skip to content

Instantly share code, notes, and snippets.

View pointer's full-sized avatar
🏠
Working from home

Kateb Ghemari pointer

🏠
Working from home
  • Miradata
  • Paris
View GitHub Profile
@davecoutts
davecoutts / word_doc_to_docx.py
Last active March 28, 2023 05:01
Convert Word 'doc' files to 'docx' format using win32com to automate Microsoft Word
# Convert Microsoft Word 'doc' files to 'docx' format by opening and
# saving Word files using win32com to automate Microsoft Word.
#
# The script walks a directory structure and converts all '.doc' files found.
# Original 'doc' and new 'docx' files are saved in the same directory.
#
# This Word automation method has been found to work where OFC.exe and
# wordconv.exe do not.
#
# Tested using Windows 7, Word 2013, python 2.7.10, pywin32-219.win-amd64-py2.7