Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2020, 04:02 PM
Charles Kenyon Charles Kenyon is offline Applying heading styles from normal template to all files in a folder Windows 10 Applying heading styles from normal template to all files in a folder Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I have not looked at your code, sorry.
Here is my template that copies heading styles to the Active Document through a macro which is documented in the template.
Outline Heading Styles Global Stylesheet Add-In

You do not need to attach the normal template or any template to copy all of the styles or selected from it.

If using OrganizerCopy method, you should do it for all styles three times if any of the styles are based on another style being copied. (This may be superstition but I've done it that way since Word 97 to avoid problems.)

Here is code to update all styles wiithout using the organizer or attaching the template.

Code:
Private Sub CopyNormalTemplateStylesVogelar()


' Copies styles from normal template ' 2019-12-01 Hans Vogelar ActiveDocument.CopyStylesFromTemplate (NormalTemplate.fullname) End Sub Private Sub CopyAllStylesGlobal() ' Copies all styles from Global Template - the template containing the macro ' 2020-01-12 Charles Kenyon ActiveDocument.CopyStylesFromTemplate (ThisDocument.fullname) End Sub
Macro to copy styles from one template to another - Microsoft Community

Both Graham Mayor and Greg Maxey have free utilities to batch process documents. Unless you are working on learning to code and enjoy it, you may want to use their utilities.

Here is the MVP article on batch processing. You seem to be following a similar path. How to Find & ReplaceAll on a batch of documents in the same folder by Ibby.

Last edited by Charles Kenyon; 10-27-2020 at 07:29 AM.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Applying heading styles from normal template to all files in a folder Normal.dot Relationship of document and template. Durability of Styles when doc sent. crw1@y7mail.com Word 6 07-29-2020 03:08 PM
Keeping or restoring "Start at" value for heading list after updating styles from a template WordUser789 Word VBA 9 04-15-2019 12:16 AM
Styles and not applying correctly GinnyBcore Word 1 10-02-2018 03:18 PM
Applying a new theme to a new template in 2016 moves graphics in the template around dianahbr PowerPoint 0 02-27-2018 11:04 AM
Applying heading styles from normal template to all files in a folder Movable Word template with linked files and hidden folder Elmobram22 Word 6 11-15-2013 02:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:25 AM.


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