Version

CreateNewWorkbookFont Method

Factory method which creates new workbook font.
Syntax
'Declaration
 
Public Function CreateNewWorkbookFont() As IWorkbookFont
public IWorkbookFont CreateNewWorkbookFont()

Return Value

The created excel font object.
Remarks

IWorkbookFont describes font used in excel workbook. If many parts of excel workbook have same and complex (more than one property in common) font formatting, use this method in following manner:

  1. Create new font format with CreateNewWorkbookFont,
  2. Set all necessary properties on given font format,
  3. Apply font format to all excel objects which use it with IWorkbookFont.SetFontFormatting method.

Use of this procedure will simplify you code for complex font formats and increase speed of resulting program. It will not reduce total number of font formats in a workbook as font formats are internally cached no matter which method is used.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also