Does anybody know if it's possible to set the default font for all Office 2010 apps in the OCT (Office Customization Tool)?

I can't seem to find anything that relates to it being possible and when loading the OCT, there's only an option to set Excel's default font.

Thanks in advance.
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Default fonts are controlled by templates, e.g. NORMAL.DOT[x] in Word. Create a customised version for each app and install them. Personally, I avoid replacing the default templates and use the different start-up folders to hold customisations because the defaults get replaced during upgrades and/or re-installs.
Answered 01/19/2011 by: VBScab
Red Belt

Please log in to comment
Ok thanks, so I assume this means that you can't set the default fonts up in the OCT?
Answered 01/19/2011 by: cowley
Orange Belt

Please log in to comment
Kind of. You'll need to add the files which comprise the template(s) and set their target folder(s) to be the start-up folder appropriate for the particular application. You add those files in one of the later dialogs in OCT.
Answered 01/19/2011 by: VBScab
Red Belt

Please log in to comment
I wrote a hefty automation script once upon a time, because the company I worked for then wanted to standardise the font to Arial (not Calibri) amongst other things, whilst not overwriting what the user already had (in case they had templated macros and custom styles etc etc)

Here's part of what I knocked up....I also did it for Powerpoint, Excel, Outlook etc. Not sure if what I have here is slightly old (untested) code (it's in my archived scripts) but feel free to have a dig through it....

Option Explicit
On Error Resume Next

Dim WshShell
set WshShell = CreateObject("WScript.Shell")

Dim currentUserAppData
currentUserAppData = WshShell.RegRead("HKCU\Volatile Environment\APPDATA")

Dim templateFolderPath : templateFolderPath = currentUserAppData & "\Microsoft\Templates\"

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

'***We need to create normal.dot first, otherwise creation of normal.dotm fails.
'Word 2003

'Word 2007

Function generateTemplate(fname)

'Generate path to normal.dot
Dim templateFilePath : templateFilePath = templateFolderPath & fname

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

'Create Word automation object
Dim Word
Set Word = CreateObject ("word.application")
Dim wordDoc
Const wdLineSpacingSingle = 0

If fso.FileExists(templateFilePath) Then
'open template
Set wordDoc = Word.Documents.Open(templateFilePath)
'create template path if not exist
If Not fso.FolderExists(templateFolderPath) Then
End If
'create template
Set wordDoc = Word.Documents.Add

End If

'change font to Arial, 11
Dim objSelection
Set objSelection = Word.Selection

objSelection.Font.Name = "Arial"
objSelection.Font.Size = "11"
objSelection.Font.Bold = False
objSelection.Font.color = wdColorBlack
objSelection.ParagraphFormat.LineSpacingRule = wdLineSpacingSingle
objSelection.ParagraphFormat.SpaceAfter = 0

'-587137025 = black

With wordDoc.Styles("Heading 1").Font
.Name = "Arial"
.Size = 16
.Bold = True
.Color = wdColorBlack
End With
With wordDoc.Styles("Heading 1").ParagraphFormat
.SpaceBefore = 12
.SpaceAfter = 3
End With

With wordDoc.Styles("Heading 2").Font
.Name = "Arial"
.Size = 14
.Bold = True
.Italic = True
.Color = wdColorBlack
End With
With wordDoc.Styles("Heading 2").ParagraphFormat
.SpaceBefore = 12
.SpaceAfter = 3
End With

With wordDoc.Styles("Heading 3").Font
.Name = "Arial"
.Size = 13
.Bold = True
.Color = wdColorBlack
End With
With wordDoc.Styles("Heading 3").ParagraphFormat
.SpaceBefore = 12
.SpaceAfter = 3
End With

Const wdFormatTemplate = 1
Const wdFormatXMLTemplateMacroEnabled = 15

'get template type
Dim templateType : templateType = Right(templateFilePath, Len(templateFilePath) - InStrRev(templateFilePath, "."))

'save .dot file
Select Case templateType
wordDoc.SaveAs templateFilePath, wdFormatTemplate
wordDoc.SaveAs templateFilePath, wdFormatXMLTemplateMacroEnabled
End Select

'close word document

'quit automation object

'release object
Set Word = Nothing

End Function

'release other objects
Set fso = Nothing
Set WshShell = Nothing
Answered 01/19/2011 by: captain_planet
Fourth Degree Brown Belt

Please log in to comment