ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Embedded Font (https://www.excelbanter.com/excel-discussion-misc-queries/89666-embedded-font.html)

tomkorver

Embedded Font
 

Hi,
Is it possible to have an embedded font?
Is there maybe a macro that will install a font when
you open the sheet, and uninstall it when you exit for example?
Please help me out!
Thanks, Tom


--
tomkorver
------------------------------------------------------------------------
tomkorver's Profile: http://www.excelforum.com/member.php...o&userid=34619
View this thread: http://www.excelforum.com/showthread...hreadid=543951


Gary''s Student

Embedded Font
 
Yes. Macro1 selects a cell ( in this case A1) and applies formats to it:


Sub Macro1()
Range("A1").Select
Selection.NumberFormat = "$#,##0.00"
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Font
.Name = "Courier New"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Sub


Macro2 clears all format on the active worksheet:

Sub Macro2()
Cells.Select
Selection.ClearFormats
End Sub

and could be run prior to saving the workbook.

--
Gary's Student


"tomkorver" wrote:


Hi,
Is it possible to have an embedded font?
Is there maybe a macro that will install a font when
you open the sheet, and uninstall it when you exit for example?
Please help me out!
Thanks, Tom


--
tomkorver
------------------------------------------------------------------------
tomkorver's Profile: http://www.excelforum.com/member.php...o&userid=34619
View this thread: http://www.excelforum.com/showthread...hreadid=543951



Dave Peterson

Embedded Font
 
You can't embed a font in excel.

I've never seen any one post a macro that would do what you want.

A search of Google through the *VB* newsgroups gets lots of hits.

Here's one:
http://groups.google.co.uk/group/mic...d935ca6e55ba42

or
http://snipurl.com/qpsu

And another shorter version:
http://groups.google.co.uk/group/mic...2e251e2c8461bb

or
http://snipurl.com/qpt0

Maybe you can make one of them work.

tomkorver wrote:

Hi,
Is it possible to have an embedded font?
Is there maybe a macro that will install a font when
you open the sheet, and uninstall it when you exit for example?
Please help me out!
Thanks, Tom

--
tomkorver
------------------------------------------------------------------------
tomkorver's Profile: http://www.excelforum.com/member.php...o&userid=34619
View this thread: http://www.excelforum.com/showthread...hreadid=543951


--

Dave Peterson


All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com