I am using VBA to generate a new Outlook Email. My code works as expected when assigning a hard coded table width, however I would like to assign width: 500px; to a variable and use the variable throughout the body of my email.
How can I achieve this? I know we cannot use CSS with VBA as we're limited to a bare bones version of HTML via VBA / Outlook
CODE
Sub SendEmail
'shortened code
Dim tblWidth as double
tblWidth = 500
'i would like <td style = 'width:tblWidth px;...
With EmailMessage
.To = "[email protected]"
'...other email properties listed here
.HTMLBody = "<table><td style='width:500px; color:#4d4d4d; height=2px;'></td></table>"
End With
End Sub