none
Word 2007 Custom Template in Word Startup Styles Problem RRS feed

  • Question

  • Hello all

    I've created a custom template in Word 2007 that has a custom group on the Home ribbon with a combo box that allows users to open documents based on other templates.  Works beautifully, but... it also has to have custom corporate styles.  I created the styles in the template and then made sure that the Styles gallery and task pane only displays the custom styles.  I then put the template in the Word Startup file C:\Users\UserName\AppData\Roaming\Microsoft\Word\STARTUP believing it would over-ride Normal.dotm - which it did - however when a document was based on the template Normal.dotm overrode the styles and although the menu to the other documents worked fine, the styles the user sees are those from the original Normal.dotm.

    Apart from renaming the custom template as Normal.dotm and putting it in the templates directory and renaming the original Normal.dotm to OldNormal.dotm, does anyone know of a way of making sure that the styles are from the custom template and not from Normal.dotm?  I also considered copying the styles from the custom template to Normal.dotm, but maybe there is some code I could use.

    Thanks for any help, it is always really appreciated, especially after a day of researching and testing and only coming to the renaming/copying conclusions.

    Aehan

    Thursday, January 13, 2011 5:16 PM

Answers

  • Hi Aehan

    I think I'm following what you've done, but forgive me if I've slipped and missed a point somewhere - end of my long day :-)

    If you put a template in Startup, it loads Ribbon customizations, macros, Building Blocks, keyboard assignments... But not styles. Styles in an add-in template are "hidden" from the Word UI.

    So what you're seeing would be termed "expected behavior". (And I once fell into the same trap, many years ago :-))

    <<custom group on the Home ribbon with a combo box that allows users to open documents based on other templates.  Works beautifully, but... it also has to have custom corporate styles.>>

    You need to create/copy the styles to these templates. New documents created from these templates should correctly inherit the styles, although documents created using (for example) Ctrl+N will not unless you also copy the styles to Normal.dotm.

    If you display the Styles task pane and click the third button from the left (Manage Styles) you'll see a button "Import/Export". This opens the "Organizer", which will let you painlessly copy styles from one "container" file to another. The only thing it does not handle well is copying styles with associated Numbering.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by aehan Friday, January 14, 2011 9:20 AM
    Thursday, January 13, 2011 5:52 PM
    Moderator

All replies

  • Hi Aehan

    I think I'm following what you've done, but forgive me if I've slipped and missed a point somewhere - end of my long day :-)

    If you put a template in Startup, it loads Ribbon customizations, macros, Building Blocks, keyboard assignments... But not styles. Styles in an add-in template are "hidden" from the Word UI.

    So what you're seeing would be termed "expected behavior". (And I once fell into the same trap, many years ago :-))

    <<custom group on the Home ribbon with a combo box that allows users to open documents based on other templates.  Works beautifully, but... it also has to have custom corporate styles.>>

    You need to create/copy the styles to these templates. New documents created from these templates should correctly inherit the styles, although documents created using (for example) Ctrl+N will not unless you also copy the styles to Normal.dotm.

    If you display the Styles task pane and click the third button from the left (Manage Styles) you'll see a button "Import/Export". This opens the "Organizer", which will let you painlessly copy styles from one "container" file to another. The only thing it does not handle well is copying styles with associated Numbering.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by aehan Friday, January 14, 2011 9:20 AM
    Thursday, January 13, 2011 5:52 PM
    Moderator
  • Hi Cindy

    Thank you for your very helpful answer.  It confirms what I thought, but it took me a whole day to get there! 

    Best wishes

    Aehan

    Friday, January 14, 2011 9:23 AM