word 2010 runtime error when generating new plantuml image

0 votes
asked Apr 9, 2015 in Bug by zenbooster (120 points)

PlantUML_Template_v30.dotm

Grapviz 2.38

plantuml.jar v 8022

 

When generating new plantuml image:

"Run-time error '-2147467259 (80004005)':

Method 'ScaleHeight' of object 'InlineShape' failed"

It occurs in any diagrams.

Example:

@startuml

 [*] --> s0

s0 --> s1: A

s1 --> s2: B

s1 --> s3: C

s2 --> s3: D

s3 --> [*]: E

@enduml

 

1 Answer

+1 vote
answered Oct 4, 2015 by anonymous
This happens if the image is being inserted in a section. Some of the ActiveDocument.PageSetup.XxxxxMargin property returns 99999 causing the runtime error.

To fix this edit the macro and replace all instances of "ActiveDocument.PageSetup......" with "currentparagraph.PageSetup......"
commented Apr 13, 2017 by Terry (140 points)
Applied this change to the V31 template. Fixed the issues I was seeing with sections in Word 2016. Thanks.
commented Apr 13, 2017 by plantuml (265,360 points)
Great! Could you send us (plantuml@gmail.com) your patched V31 template ?
So that we could publish a V32
Thanks!
...