There are now two differents way of using PlantUML from Word.

Word Template

Adriaan van den Brand has made several improvements to the VBA script. He has created a Word Template that allows a better integration between Word and PlantUML and better performance.

This template allows using PlantUML directly from MS Word 2010 without need to alter document templates or edit VBA macro's. MS Word Versions 2007 and 2013 might work, but are not tested.

Everything is documented in the template itself, that you can download here (PlantUML Template v23.dotm).

Many thanks for his works!


Manual installation

If you wish, you can use the manual installation.

The integration between PlantUML and Word (Word 2003 and Word 2007) is done using the following new buttons bar:

Macro Security

Unfortunately, since PlantUML is written in Java, the Word macro must launch a new process when it runs, and this is a big security risk.

So you have to lower the security of Word to be able to use PlantUML .

Short Installation Guide

  1. Put a copy of plantuml.jar in the same directory of your Word document.
  2. Put a copy of PlantUML_V007.bas in the same directory of your Word document.
  3. In the menu Tools/Macro/Security, set the security to Low. (So that the macro can launch the Java process).
  4. Open the Visual Basic Editor with the menu Tools/Macro/Visual Basic Editor.
  5. With the mouse right button, choose Import a file on your document and choose the PlantUML_V007.bas file.
  6. The macro is now imported, so close the Visual Basic Editor
  7. The very first time, launch the macro Macro_UML_all with the menu Tools/Macro/Macros....
  8. This will create the new toolbar
  9. Test it!

The macro searches the plantuml.jar file in that order:

  1. In the same directory as your document
  2. Then, in the parent directory of this directory
  3. Then, in the parent directory of the parent... up to the root folder
  4. Then, in the same directory as the normal.dot file
  5. Then, in the parent directory of this directory
  6. Then, in the parent directory of the parent... up to the root folder
If the plantuml.jar file is not found, a box display the list of all searched directories.

Demonstration

Support This Project Offer 250 Mo! Follow PlantUML on Twitter PlantUML on Google Reader