Solved

Table not in designated font

Posted on 2014-04-29
4
131 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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now