Solved

Table not in designated font

Posted on 2014-04-29
4
141 Views
Last Modified: 2014-04-30
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
Comment
Question by:uad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
Norie earned 500 total points
ID: 40030992
Try  this to format the table
    strTable = strTable + "<table width='80%' border='1' style='font-family:""Arial"",""sans-serif""'>"

Open in new window

0
 

Author Comment

by:uad
ID: 40032068
OK - it worked - but can you explain the "style" information used.  I guess I'm thrown off by the use of  "san-serif"
0
 
LVL 34

Expert Comment

by:Norie
ID: 40032184
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
 

Author Comment

by:uad
ID: 40032195
Thank you
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question