Solved

Table not in designated font

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

739 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