Author Topic: HTML export urls get mangled by Word  (Read 2252 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12978
  • Karma: +540/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
HTML export urls get mangled by Word
« on: November 05, 2019, 01:33:08 am »
We publish our model as a HTML model to a webserver.

Now in my exported word documents I want to add a link to the diagrams in the published HTML export.

I can do that by adding a fixed part: http://eamodel.mydomain.local/?guid= and then add the GUID of the diagram {8E282D3D-15AD-4b6a-8523-F2E81DEF3F1A}{Diagram.GUID}
together this then becomes something like

http://eamodel.mydomain.local/?guid={8E282D3D-15AD-4b6a-8523-F2E81DEF3F1A}

This looks look, but when I let Word make this into a hyperlink, the url is somehow encoded and doesn't work anymore.
It becomes: http://eamodel.mydomain.local/?guid=%7b8E282D3D-15AD-4b6a-8523-F2E81DEF3F1A%7d and the EA HTML export doesn't recognise it anymore (get a page not found error)

I tried setting the hyperlink.Address in VBA, but that doesn't help. Word keeps changing it behind my back.

Does anyone have a solution to this problem?

Geert

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: HTML export urls get mangled by Word
« Reply #1 on: November 05, 2019, 04:04:12 am »
It looks like Word is translating the '{' & '}' literally.  You might try substituting { for '{' and } for '}' which are the html escape representations for those two.  I pulled the escape characters from https://www.werockyourweb.com/html-escape-characters/ .

I haven't tried this but have had similar issues sometimes in the past.

Stan.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8017
  • Karma: +118/-20
    • View Profile
Re: HTML export urls get mangled by Word
« Reply #2 on: November 05, 2019, 09:59:48 am »
You shouldn't include the braces anyway.

https://www.sparxsystems.com/enterprise_architect_user_guide/15.0/model_publishing/htmlreport.html
Quote
Type the word guid in lower case, and do not include braces { } in the value; for example:

http:// .../path/Index.htm?guid=DC62B0DA-0D60-4447-85E6-B9BBAE7FC90F

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12978
  • Karma: +540/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: HTML export urls get mangled by Word
« Reply #3 on: November 05, 2019, 03:26:11 pm »
Ah, so that might be the solution.

Now is there an easy way to output the guid of my diagram without the braces?
{Diagram.GUID} includes those braces.

Geert