Add an hyperlink to your company logo in 4D Write Pro

Automatically translated from English

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.

Database Example 

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;"")

Roland Lannuzel

• Product Owner & 4D Expert •

After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.

Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.