A SharePoint Workflows tutorial by Peter Kalmström
When
you create a workflow for automatic e-mails, you might want
to format the e-mail body field, for example with a table
or an image.
The formatting can be done with HTML code, and in the demo
below, Peter Kalmström, CEO and Systems Designer
of kalmstrom.com Business Solutions, shows how to manage
it.
The techniques Peter describes, can of course also be used
in other workflows when you need to build HTML, such as
creating SharePoint list items with HTML formatting. If
you know some HTML, it is not difficult, and for the table
you can even manage without that knowledge.
A good option for images is to copy image code that
has been written in an HTML editor. But you cannot paste
the code directly into the e-mail body field in SharePoint
Designer. Instead, you should use a local variable, as Peter
shows in the demo below.
For tables, HTML code in a local variable does not
work well. Instead, you can create a table in Word and paste
it into the e-mail body field in SharePoint Designer. The
HTML code behind the Word table will automatically be translated
into suitable SharePoint Designer code when you paste the
table.
When you build the workflow and create the template for
the e-mail body, you can add lookups for the image variable
and for any dynamic content you wish to use in the table.