Wednesday 6 July 2016

Adding Dynamic Images from a web Service

ok this gave me quite the headache.

i had a task of adding a dynamic 2d barcode to one of my RTF templates using a web service , where i could read a URL in my XML. call the web service and get back a nicely formatted barcode.

I found lots of examples using word 2007 but ofc we were using word 2010 and the methods described didnt work . so after a lot of head scratching , crying and chicken bothering I found the following

in typical Microsoft fashion they have made it a bit more aqward in word 2010 (just to annoy us developers I think).

instead of adding a dummy image to resolve this I needed to 
1. click on the developer tab
2.go to legacy tools and select image Active x control
3. right click on the image and select the alternate text tab
4. enter url:{} and inside the {} enter the absolute path to the tag that holds the URL to where the image was generated from the web service  .

trust Microsoft to make things ten times more difficult :)