A less well known usage of 4D Write Pro product is the production of HTML emails. In fact you can create a 4D Write Pro document including 4D expressions, text and images, then modify the document, paragraph or text properties and send it by email. In this context, a very common need is to add a link to a picture, e.g. your company logo.
4D Write Pro has been enhanced with 4D v16 R4 so that hyperlinks can now been added to text and/or pictures. Setting a link to your company logo or company name is now as easy as styling some text to bold.
Thanks to the new wk link url attribute, the WP SET ATTRIBUTES and WP GET ATTRIBUTES commands allow you to assign and/or read an URL from a 4D Write Pro range.
Code example
Quick example: to add a link, you just need to select the picture, then the text…
…and, each time, execute the code below and it’s done!
$range:=WP Get selection(*;"WriteProArea")
WP SET ATTRIBUTES($range;wk link url;"http://www.4d.com")