Encrypt Word

About the project

This is a simple way to send encrypted messages over the premise of a boring email.
This was created with help from a variety of different resources: Chapter 6 of Impractical Python Projects by Lee Vaughan, study of the python-docx module, and study of the Vigenère cipher. More on the Vigenère cipher can be found here.

How to use it


To prepare for running of the program, you must do the following:

  • Create a .docx file containing the secret message you want to send.

  • Create a .docx file with a fake, boring message to hide your secret message in.

  • Create a .docx template file that contains no text but has all style, font, margins, etc. set.

Additionally, if you'd like, you could customize the "HEADING_NAME", "HEADING_SUBTITLE", and "HEADING_DATE" variables in "encode.py" to fit your needs.


To actually encrypt the code, just run "encode.py" and put in the names of the documents you created. Additionally, you'll need to come up with a unique cipher key to guide the encryption. A new file will be created with your hidden and encrypted message in it!

As you can see, the resulting message looks totally innocent, even when highlighting it with a cursor!


To see the text in the resulting file, you need to select all the text in the document and highlight it in black. Then, the secret message, encrypted via the Vigenère cipher, will be visible.

To decrypt text encrypted by this program, you just have to run "decode.py" and copy-paste in the text you want to decrypt.

You can find all the code here.