• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

Table not in designated font

I am using Excel VBA to generate a mass email distribution.  Everything is working fine with both the basic email and distribution except for a table inserted into the email.  Despite setting the font to Arial the table is placed in the email in Times Roman.

I am trying to have the table, like the email, be in Arial.  Attached is the extract of the VBA specific to the table.
Sub-TableBody.docx
0
uad
Asked:
uad
  • 2
  • 2
1 Solution
 
NorieVBA ExpertCommented:
Try  this to format the table
    strTable = strTable + "<table width='80%' border='1' style='font-family:""Arial"",""sans-serif""'>"

Open in new window

0
 
uadAuthor Commented:
OK - it worked - but can you explain the "style" information used.  I guess I'm thrown off by the use of  "san-serif"
0
 
NorieVBA ExpertCommented:
Ignore that, it's part of the font name but isn't really needed and I meant to remove it before posting.

By the way, the concatenation operator in VBA is & not +.

Using + shouldn't cause any problems though, unless you were dealing with numeric data.
0
 
uadAuthor Commented:
Thank you
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now