Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 01-29-2024, 03:33 PM
Guessed's Avatar
Guessed Guessed is offline Copying Styles from Normal.dot to Documents Windows 10 Copying Styles from Normal.dot to Documents Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,166
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Every document will need to be opened, updated and saved for this to happen but it doesn't have to be done manually and may not be even be required to happen via a batch macro.

At its simplest you could add this macro to your Normal.dotm template (It has to be placed in the ThisDocument module). This will then run automatically as YOU open any existing document to import the style definitions from YOUR Normal template.
Code:
Private Sub Document_Open()
  ActiveDocument.CopyStylesFromTemplate NormalTemplate.FullName
  'ActiveDocument.CopyStylesFromTemplate AttachedTemplate.FullName 'a better alternative?
End Sub
It doesn't matter that thousands of documents don't have the right styles if EACH one is updated as it is opened. Over time, you will gradually update them as each one is opened and you won't realise they aren't all already updated.

Now, having said all that I will now recommend you reconsider if Normal.dotm is what you truly want applied in all cases. I am a true believer in the power of templates and Normal.dotm is rarely the basis for styles in my documents. I STRONGLY recommend that users make use of different templates for different purposes - style definitions should vary according to the document type eg letters/memos/reports/user guides/posters because each document type requires different layouts. The disabled line in the code above provides an alternative option that might be a better fit for your requirement. If the document has Normal as its 'Attached template' then it has the same effect as the enabled line of code but if a purpose-built template was used then you won't be breaking with this alternate code.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Styles from Normal.dot to Documents Troubleshooting styles based on Normal and List styles stameni Word 5 09-17-2021 12:07 PM
Copying Styles from Normal.dot to Documents Copying style from normal template into current documet tamasig Word VBA 3 01-04-2020 12:39 PM
Macro to apply Normal dot styles John9210 Word VBA 2 06-07-2018 05:15 PM
Copying styles kennethc Word 1 06-28-2017 11:29 AM
Why can't I change certain styles back to normal? SuperHans Word 1 10-16-2009 03:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft