HTML Email look through two recordsets help

I thank you for all of your patience with me so far, but I am still muddled. I don't have a text editor. You stated:
Your probably not closing a table tag. Either you are starting the CM table prior to closing the issue tag, or you are generating too many opening table tags.
.

So I pasted the code into a Word document and used the Find to count how many instances of the word "table" were in my code to determine if I had too many open table tags:
1592335277469.png


So I copied the relevant lines of code, above (in my previous post) to show you where the table tags are located in the code in response to your comment:
you are starting the CM table prior to closing the issue tag
 
1. If you have word, you have Notepad, that's a text editor.

2. Your still copying VBA code and not the generated HTML. You do understand at a high level what your code is doing, right? The code itself in Access is VBA, when you run the code it generates HTML (that's what the email is). I do not want you to look at the VBA and guess what it is producing. You need to get the HTML of the email your VBA code creates and look at it.
 
Gotcha - now :) and so, I did that... and I see 3 open table tags and 3 closed table tags....so, it must be the placement....
Code:
"
<TABLE Border="" 1 "", Cellspacing="" 0 "">
    <TR>
        <TH Bgcolor="" #2B3856 "", Align="" Center "">
            <Font Color=#FFFFFF><b><p style=""font-size:14px"">No.&nbsp;</p></Font>
        </TH>
        <TH Bgcolor="" #2B3856 "", Align="" Center "">
            <Font Color=#FFFFFF><b><p style=""font-size:14px"">KPI&nbsp;</p></Font>
        </TH>
        <TH Bgcolor="" #2B3856 "", Align="" Center "">
            <Font Color=#FFFFFF><b><p style=""font-size:14px"">Ranking&nbsp;</p></Font>
        </TH>
        <TH Bgcolor="" #2B3856 "", Align="" Center "">
            <Font Color=#FFFFFF><b><p style=""font-size:14px"">RPS Started&nbsp;</p></Font>
        </TH>
        <TH Bgcolor="" #2B3856 "", Align="" Center "">
            <Font Color=#FFFFFF><b><p style=""font-size:14px"">Issue Details&nbsp;</p></Font>
        </TH>
    </TR>
    <TR>
        <TD align=center width="" 10% "">Z2-Q-1</TD>
        <TD align=center width="" 15% "">Quality</TD>
        <TD align=center width="" 10% "">C</TD>
        <TD align=center width="" 15% "">False</TD>
        <TD align=left width="" 50% "">the swift red fox jumped over the lazy brown cow</TD>
    </TR>
    <TABLE Border="" 1 "", Cellspacing="" 0 "">
        <TR>
            <TH Bgcolor="" #2B3856 "", Align="" Center "">
                <Font Color=#FFFFFF><b><p style=""font-size:14px"">CM Details&nbsp;</p></Font>
            </TH>
            <TH Bgcolor="" #2B3856 "", Align="" Center "">
                <Font Color=#FFFFFF><b><p style=""font-size:14px"">Responsible&nbsp;</p></Font>
            </TH>
            <TH Bgcolor="" #2B3856 "", Align="" Center "">
                <Font Color=#FFFFFF><b><p style=""font-size:14px"">Target Date&nbsp;</p></Font>
            </TH>
        </TR>
        <TR>
            <TD align=left width="" 40% "">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</TD>
            <TD
            align=center width="" 15% "">tba</TD>
                <TD align=center width="" 10% "">6/12/2020</TD>
        </TR>
        <TR>
            <TD align=left width="" 40% "">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</TD>
            <TD align=center width="" 15% "">tba</TD>
            <TD align=center width="" 10% "">6/15/2020</TD>
        </TR>
    </table>
    <TR>
        <TD align=center width="" 10% "">Z2-S-1</TD>
        <TD align=center width="" 15% "">Safety</TD>
        <TD align=center width="" 10% "">C</TD>
        <TD align=center width="" 15% "">False</TD>
        <TD align=left width="" 50% "">Et harum quidem rerum facilis est et expedita distinctio.</TD>
    </TR>
    <TABLE Border="" 1 "", Cellspacing="" 0 "">
        <TR>
            <TH Bgcolor="" #2B3856 "", Align="" Center "">
                <Font Color=#FFFFFF><b><p style=""font-size:14px"">CM Details&nbsp;</p></Font>
            </TH>
            <TH Bgcolor="" #2B3856 "", Align="" Center "">
                <Font Color=#FFFFFF><b><p style=""font-size:14px"">Responsible&nbsp;</p></Font>
            </TH>
            <TH Bgcolor="" #2B3856 "", Align="" Center "">
                <Font Color=#FFFFFF><b><p style=""font-size:14px"">Target Date&nbsp;</p></Font>
            </TH>
        </TR>
        <TR>
            <TD align=left width="" 40% "">Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?</TD>
            <TD align=center width="" 15% "">tba</TD>
            <TD align=center width="" 10% "">6/21/2020</TD>
        </TR>
    </table>
</table>"
 
Save the above code in a file and make a copy. In the copy tweak the HTML until it produces the format you want. Once you have that you can compare the 2 files and see what lines in the VBA you need to modify to get the desired output.
 

Users who are viewing this thread

Back
Top Bottom