Hi @7thFloor ,
Actually, the key point of your issue is how to write collection in the format of html text.
Firstly, you need to create the collection with the data that you want:
Collect(PermitInfo, {NearestHwy: 'NH.inp'.Text, NHState: 'NH-state.ckb'.Text, NHState: 'NH-fed.ckb'.Text, NHLat: 'NH-Lat.inp'.Text, NHLong: 'NH-Long.inp'.Text, POBLat: 'POB-Lat.inp'.Text, POBLong: 'POB-Long.inp'.Text, WorkDescription: 'Work-Desc.inp'.Text, Parish: 'Parish.combo'.Text, ParaHwyNum: 'Para-Hwytxt.inp'.Text, CrossHwyNum: 'Cross-Hwytxt.inp'.Text, Parastate: 'Para-state.ckb'.Text, Parafed: 'Para-fed.ckb'.Text, Crossstate: 'Cross-state.ckb'.Text, Crossfed: 'Cross-fed.ckb'.Text, ParaMainlength: 'Para-Mainlength.inp'.Text, CrossMainlength: 'Cross-Mainlength.inp'.Text, ParaPipeseize: 'Para-Pipesize.sli'.Text, CrossPipesize: 'Cross-Pipesize.sli'.Text, ParaHeyROW: 'Para-HwyROW.inp'.Text, CrossHwyROW: 'Cross-HwyROW.inp'.Text})
Your collection is named PermitInfo and have these fields: NearestHwy,NHState,NHLat,NHLong,POBLat,POBLong ,WorkDescription,Parish ,ParaHwyNum ,CrossHwyNum,Parastate,Parafed ,Crossstate ,Crossfed ,ParaMainlength,CrossMainlength,ParaPipeseize,CrossPipesize ,ParaHeyROW ,CrossHwyROW.
I suggest you use a HtmlText control to write the html text and use the HtmlText control data directly in your email.
Set your HtmlText's HtmlText: (I assume that the HtmlText control named HtmlText1)
"<h3>PermitInfo</h3>" &
"<strong> Items: </strong>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
"<tr style='background-color:#efefef'>
<th>NearestHwy</th> <th> NHState </th> <th> NHLat </th><th> NHLong
</th<th>POBLat</th> <th>POBLong </th> <th>WorkDescription</th> <th>Parish</th>
<th>ParaHwyNum </th> <th>CrossHwyNum</th> <th>Parastate</th> <th>Parafed </th>
<th>Crossstate </th> <th>Crossfed </th> <th>ParaMainlength</th>
<th>CrossMainlength</th> <th>ParaPipeseize</th> <th>CrossPipesize </th>
<th>ParaHeyROW </th> <th>CrossHwyROW</tr>
//fill in fieldname in this format: <th>fieldname</tr>
</tr>
<tr>" &
Concat(PermitInfo,
"<td>" & NearestHwy & " </td>
<td>" & NHState & " </td>
<td>" & NHLat & " </td>
<td>" & NHLong & " </td>"
<td>" & fieldname & " </td>"
<td>" & POBLat & " </td>"
<td>" & POBLong & " </td>"
<td>" & WorkDescription & " </td>"
<td>" & Parish & " </td>"
<td>" & ParaHwyNum & " </td>"
<td>" & CrossHwyNum & " </td>"
<td>" & Parastate< & " </td>"
<td>" & Parafed & " </td>"
<td>" & Crossstate & " </td>"
<td>" & Crossfed & " </td>"
<td>" & ParaMainlength & " </td>"
<td>" & CrossMainlength & " </td>"
<td>" & ParaPipeseiz & " </td>"
<td>" & CrossPipesize & " </td>"
<td>" & ParaHeyROW & " </td>"
<td>" & CrossHwyROW<& " </td>",
//fill in fieldname in this format: <td>" & fieldname<& " </td>"
"</tr><tr>") &
"</table>"
Then send email with this html text:
Office365.SendEmail(to email address, email subject, HtmlText1.HtmlText, {IsHtml: true})
Best regards,