Solved

Table not in designated font

Posted on 2014-04-29
4
138 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 33

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 33

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

735 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