Gabor
04-30-2006, 03:22 AM
Hi All,
I have been reading these forums for quite some time before registering and it is good to see there are so many helpful people here. :friends:
I was never an expert in this field but I used to be able to modify existing codes to a certain extent. After more than four years with Star/OpenOffice I am a "re-convert" to MS Office.
Now my question.
All my new docs are based on Normal and all the styles I need are based on Normal. I would like to achieve that whenever I create a brand new Word doc, the box "Automatically update document styles" on the Templates and plug-ins panel should be checked. It is unchecked by default.
(My Office is Hungarian so I can only translate the names and captions back into English, sorry.)
I managed to record the following code:
Sub AutoUpdateStyles()
Documents.Add DocumentType:=wdNewBlankDocument
With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = "Normal"
End With
End Sub
This is not really good as I have to start it from inside Word already open by a separate macro button.
My capability goes as far as inserting code into the "ThisDocument" Module of Normal.
Would somebody be so kind as to let me have the code what I would have to insert there so that all my NEW docs further on should open with the facility of updating styles ON? (Already existing doc left untouched).
Thank you very much.
I have been reading these forums for quite some time before registering and it is good to see there are so many helpful people here. :friends:
I was never an expert in this field but I used to be able to modify existing codes to a certain extent. After more than four years with Star/OpenOffice I am a "re-convert" to MS Office.
Now my question.
All my new docs are based on Normal and all the styles I need are based on Normal. I would like to achieve that whenever I create a brand new Word doc, the box "Automatically update document styles" on the Templates and plug-ins panel should be checked. It is unchecked by default.
(My Office is Hungarian so I can only translate the names and captions back into English, sorry.)
I managed to record the following code:
Sub AutoUpdateStyles()
Documents.Add DocumentType:=wdNewBlankDocument
With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = "Normal"
End With
End Sub
This is not really good as I have to start it from inside Word already open by a separate macro button.
My capability goes as far as inserting code into the "ThisDocument" Module of Normal.
Would somebody be so kind as to let me have the code what I would have to insert there so that all my NEW docs further on should open with the facility of updating styles ON? (Already existing doc left untouched).
Thank you very much.