Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Font Width

Status
Not open for further replies.

rloiben

Technical User
Nov 20, 2001
3
US
I am creating e-mail signatures for the office using VBA. Underneath the employee's name, I need to create a line. The line should be approximately the same width of the name, but my boss does not want to use a fixed width font (does not as nice).

How can I calculate the font width so I can make the line size (____) the same? One idea I had was to approximate the letter size myself on a different spreadsheet but I have a feeling there is a better way.

Thanks.
 




On a SEPARATE sheet, enter the full name in a cell in a column that has nothing else in it.

Format the CELL with a BOTTOM border.

Auto fit the column.

Select the cell

Use the CAMERA ToolButton (can be found right-click toolbar > Customize > Tools - Scrool to CAMERA to "copy"

select your sheet for the signature and place on sheet.

Drag to desired location.

Format object as desired to remove lines.


Skip,

[glasses]Just traded in my old subtlety...
for a brand NUANCE![tongue]
 
That's a pretty cool feature... but not going to work for this project (however I did add it to my toolbar and can't wait to use it!!!!

I have a spreadsheet of 500 employee's names, title, phone number, fax, etc., and with VBA I am creating separate HTML files (one for each employee) to use as a signature at the bottom of all of their e-mail addresses. I have everything figured out with the exception of the line that separates the name from the other information (it looks weird if someone has a really long (or short name) and the line doesn't match).

I'm sorry I didn't explain further... but I am glad to learn about the camera.
 




Use this is a loop to in turn,

populate the cell, and
autofit, then
COPY the object containing the Camera-Copied signature to create your HTML file.

Should be pretty simple.

Skip,

[glasses]Just traded in my old subtlety...
for a brand NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top