Hi! I am pulling some data from Access to send as table (table without borders).
I have it working fabulously except for one minor thing. The bullet in the table should be TOP-CENTERED if the 2nd column goes beyond one line. (see example attached). I cannot figure out where - or how - to incorporate the appropriate code that will align those table cells to TOP.
I appreciate any guidance!!
Code:
Private Sub Command71_Click()
Dim strQry As String
Dim aHead(1 To 2) As String
Dim aRow(1 To 2) As String
Dim aBody() As String
Dim lCnt As Long
Dim rst
Dim strEmailto As String
FileName = "G:\CLASP\CLASP Tools\" & [Guideline] & "\" & "RG_" & [Guideline] & ".pdf"
myLink = "https://www.connecticutchildrens.org/co-management/access-referral-guidelines/"
'create emails to
Set rst = CurrentDb.OpenRecordset("select [email] from [verified users]")
If rst.NoMatch Then
strEmailto = ""
rst.MoveFirst
End If
Do While Not rst.EOF
strEmailto = strEmailto & "; " & rst!Email
rst.MoveNext
Loop
'Create the header row
aHead(1) = ""
aHead(2) = ""
lCnt = 1
ReDim aBody(1 To lCnt)
aBody(lCnt) = "<HTML><body><table border='0'><tr><th>" & Join(aHead, "</th><th>") & "</th></tr>"
'Create each body row
strQry = "SELECT [summaryofchange], [guidelineID#] From [Latest summary of changes] where [guidelineid#] = " & Me![GuidelineID#]
Set db = CurrentDb
Set rec = CurrentDb.OpenRecordset(strQry)
If Not (rec.BOF And rec.EOF) Then
Do While Not rec.EOF
lCnt = lCnt + 1
ReDim Preserve aBody(1 To lCnt)
aRow(1) = "<li> </li>"
aRow(2) = rec("summaryofchange")
aBody(lCnt) = "<tr><td>" & Join(aRow, "</td><td>") & "</td></tr>"
rec.MoveNext
Loop
End If
aBody(lCnt) = aBody(lCnt) & "</table></body></html>"
'create the email
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
Signature = MailOutLook.htmlbody
With MailOutLook
.To = "name@gmail.com"
.bcc = strEmailto
.subject = "CT Children's updated CLASP tool notification"
.display
strHTMLbody = "<HTML><BODY><font face=Calibri>Dear CLASP user community, " & "<BR><BR>The CLASP tool for <b>" & [Guideline] & _
" </b>has been updated and posted the the CLASP internet site (<a href='" & myLink & "'>https://www./co-management/access-referral-guidelines/</a>)" & "." & _
" If you routinely print out the CLASP tools to use at the point of care, please be sure to print out the updated version to replace any previous ones." & _
"<BR><BR> A summary of the updates to the CLASP tool is as follows: "
strHTMLbody2 = "</p><BR>Please let us know if you have any questions." & _
"<BR><BR>Thank you,"
.htmlbody = strHTMLbody & Join(aBody, vbNewLine) & strHTMLbody2 & .htmlbody
.Attachments.Add FileName
End With
I have it working fabulously except for one minor thing. The bullet in the table should be TOP-CENTERED if the 2nd column goes beyond one line. (see example attached). I cannot figure out where - or how - to incorporate the appropriate code that will align those table cells to TOP.
I appreciate any guidance!!