Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

How I can change the default font size in normal.dot via VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leila - 28 Apr 2005 23:12 GMT
Hi There I need to change the default font from Times New Roman 12 pt to
Times New Roman 11 pt in Normal.dot. I know how do to that manually but I
need to change the font by VBA in a master template and then update all the
users Normal.dots by pushing out the master template. would you please let me
know what I'm doing wrong in below code any help would be appreciated.
Many Thanks,
Leila

Sub AutoExec()
'
'
'
Font
End Sub

--------------------

Sub Font()

   With ActiveDocument.AttachedTemplate.Styles("Normal").Font
       .Name = "Times New Roman"
       .Size = 11
       .Bold = False
       .Italic = False
       .Underline = wdUnderlineNone
       .UnderlineColor = wdColorAutomatic
       .StrikeThrough = False
       .DoubleStrikeThrough = False
       .Outline = False
       .Emboss = False
       .Shadow = False
       .Hidden = False
       .SmallCaps = False
       .AllCaps = False
       .Color = wdColorAutomatic
       .Engrave = False
       .Superscript = False
       .Subscript = False
       .Scaling = 100
       .Kerning = 0
       .Animation = wdAnimationNone
   End With
   'Selection.Style = ActiveDocument.Styles("Normal")
End Sub
Graham Mayor - 29 Apr 2005 00:12 GMT
No! Leave users' normal.dot files to the users. Provide document templates
with the required formatting for company documents.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Hi There I need to change the default font from Times New Roman 12 pt
> to Times New Roman 11 pt in Normal.dot. I know how do to that
[quoted text clipped - 41 lines]
>     'Selection.Style = ActiveDocument.Styles("Normal")
> End Sub
Leila - 29 Apr 2005 17:40 GMT
Hi Graham, we have all those settings in our organization but we are using a
third party software that opens a new document based on normal.dot and no
matter what I do I still get font 12 as the default font.
it was 11 before and for some reasons the default font has changed to 12 and
we HAVE TO change it back to 11. Please let me know if you know any solution
that I can change the default font on all normal.dots without changing any
other of the users customizations.

> No! Leave users' normal.dot files to the users. Provide document templates
> with the required formatting for company documents.
[quoted text clipped - 44 lines]
> >     'Selection.Style = ActiveDocument.Styles("Normal")
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.