C
CISadmin
Hello,
I am a newbie to Word 2007 macros.
My main goal is have standard settings for all users on the domain.
Main settings required at the moment is Font = Arial, Font size = 11 and
line spacing = 1.
I first read about AutoExec, AutoOpen & AutoNew.
I recorded the Macro to do the settings I wanted then copied the VBA code
into AutoOpen & AutoNew.
Sub AutoNew()
'
' AutoNew Macro
'
'
Selection.Font.Name = "Arial"
Selection.Font.Size = 11
End Sub
This changed the Font & Font size but not the "Normal" Style.
I recorded a new macro.
Sub AutoNew()
'
' AutoNew Macro
'
'
Selection.Font.Name = "Arial"
Selection.Font.Size = 11
With ActiveDocument.Styles("Normal").Font
.Name = "Arial"
.Size = 11
.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
With ActiveDocument.Styles("Normal")
.AutomaticallyUpdate = False
.BaseStyle = ""
.NextParagraphStyle = "Normal"
End With
End Sub
This did what I wanted but when opening a document it would modify the
heading of the opened document. i.e. Document had Bold, Centered heading. The
macro would change to Arial, 11, plain text, left.
First Problem.
How can I modify the macro so only the settings are applied, no changes are
made to the existing document when it is opened?
I have other questions but will make a new post.
Any help will be greatly appreciated.
Currently running SBS 2003 & XP SP3, Vista Clients with Office 2007.
As I am a newbie, detailed answers or links to really good step by step
documents would be greatly appreciated.
Thanks
I am a newbie to Word 2007 macros.
My main goal is have standard settings for all users on the domain.
Main settings required at the moment is Font = Arial, Font size = 11 and
line spacing = 1.
I first read about AutoExec, AutoOpen & AutoNew.
I recorded the Macro to do the settings I wanted then copied the VBA code
into AutoOpen & AutoNew.
Sub AutoNew()
'
' AutoNew Macro
'
'
Selection.Font.Name = "Arial"
Selection.Font.Size = 11
End Sub
This changed the Font & Font size but not the "Normal" Style.
I recorded a new macro.
Sub AutoNew()
'
' AutoNew Macro
'
'
Selection.Font.Name = "Arial"
Selection.Font.Size = 11
With ActiveDocument.Styles("Normal").Font
.Name = "Arial"
.Size = 11
.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
With ActiveDocument.Styles("Normal")
.AutomaticallyUpdate = False
.BaseStyle = ""
.NextParagraphStyle = "Normal"
End With
End Sub
This did what I wanted but when opening a document it would modify the
heading of the opened document. i.e. Document had Bold, Centered heading. The
macro would change to Arial, 11, plain text, left.
First Problem.
How can I modify the macro so only the settings are applied, no changes are
made to the existing document when it is opened?
I have other questions but will make a new post.
Any help will be greatly appreciated.
Currently running SBS 2003 & XP SP3, Vista Clients with Office 2007.
As I am a newbie, detailed answers or links to really good step by step
documents would be greatly appreciated.
Thanks