none
How does one make Word styles, auto text, and macros deployable for team use? RRS feed

  • Question

  • Okay, so I'm trying to standardize the following three three things in Word for widespread use among other writers:

    1. Styles (including keystroke assignments for them)
    2. Auto Text
    3. Macros

    I try making all of my settings in a word file and then save it out as a macro enabled document. For some reason, when I do this, only *sometimes* are the Styles, Auto Text, and Macos available from both new and existing documents. I've tried making the macro enabled document a both a document and global template. This only seems to work some of the time.

    My questions are as follows:

    1. Why would Microsoft make this so hard to accomplish since it seems to be the truly desired way of leveraging Word? Okay, I admit such a question is a bit cliche in the software world. Still, you can't deny this would be how you would implement Word if you could.
    2. If anyone does understand how to implement Word in the aforementioned manner, I'd really be interested in hearing how I could go about doing it and not losing my sanity.

    Thanks in advance.
    Tony


    -- Tony

    Wednesday, October 31, 2012 5:06 PM

Answers

  • Hi Tony

    As Leo says, you should use a template (*.dotm) and not a document. A document cannot contain AutoText (BuildingBlocks) so that's not a viable option.

    You wouldn't want to use a global template for styles as there's no "link" for styles between a global template (which functions as an add-in) and documents. Styles are only picked up when creating a new document from a template, when they're copied from the template into the new document. At that point, there's no active link that would pick up changes to the styles in the template - but that doesn't appear to be a concern?

    Macros and AutoText (Building Blocks) can be in a global template or in a document template (the basis for a new document, as in File/New). But if these "tools" are meant to be used only with documents for a particular project it makes more sense to have them in a document template. In this case there is an active link back to the template, as long as the document is able to locate the template (it hasn't been moved).

    The same applies to any toolbar/Ribbon customizations and keyboard shortcuts.

    The only "trick", really, for making a template easy to use is instructing the recipient how he should use it to create new documents. What he should not do is use File/Open to open it in Word. He should either double-click it in Windows Explorer or he should place it in the "Templates" folder for his user profile in Windows so that it will appear in File/New/My Templates and choose it from that dialog box.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, November 1, 2012 11:17 AM
    Moderator
  • Hi Tony

    Your suggestion would work, but is not considered optimal. The danger with re-using a file is that the user sometimes forget to use "Save As", which means the original file would be overwritten. Since you'd have to provide a dotx (AutoText doesn't require macro capability) anyway and that would have to be stored in the user's Startup folder location in order to have the AutoText available automatically, I don't see that as being any easier to use?


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, November 2, 2012 7:30 AM
    Moderator

All replies

  • Hi Tony,

    Thanks for posting in the MSDN Forum.

    Here is an article I think would be helpful for your issue. Please refer to

    http://office.microsoft.com/en-au/word-help/about-templates-in-word-HP005254327.aspx

    Every Microsoft Word document is based on a template. A template determines the basic structure for a document and contains document components and settings, such as AutoText entries, fonts, key assignments, macros, menus, page layout, special formatting, and styles.

    Hope it helps.

    Best Regards, 


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, November 1, 2012 7:50 AM
    Moderator
  • Hi Tony

    As Leo says, you should use a template (*.dotm) and not a document. A document cannot contain AutoText (BuildingBlocks) so that's not a viable option.

    You wouldn't want to use a global template for styles as there's no "link" for styles between a global template (which functions as an add-in) and documents. Styles are only picked up when creating a new document from a template, when they're copied from the template into the new document. At that point, there's no active link that would pick up changes to the styles in the template - but that doesn't appear to be a concern?

    Macros and AutoText (Building Blocks) can be in a global template or in a document template (the basis for a new document, as in File/New). But if these "tools" are meant to be used only with documents for a particular project it makes more sense to have them in a document template. In this case there is an active link back to the template, as long as the document is able to locate the template (it hasn't been moved).

    The same applies to any toolbar/Ribbon customizations and keyboard shortcuts.

    The only "trick", really, for making a template easy to use is instructing the recipient how he should use it to create new documents. What he should not do is use File/Open to open it in Word. He should either double-click it in Windows Explorer or he should place it in the "Templates" folder for his user profile in Windows so that it will appear in File/New/My Templates and choose it from that dialog box.


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, November 1, 2012 11:17 AM
    Moderator
  • Would it also work to save all styles, auto text, and macros into a specific .docx and just duplicate that specific file when creating new files?

    Sounds like much less work if so.


    -- Tony

    Thursday, November 1, 2012 8:13 PM
  • Oh, gotcha on the .dotm as the .docx doesn't store auto text. Otherwise, would it work to save styles and macros into a duplicated file that then calls a .dotm just for the auto text?

    -- Tony

    Thursday, November 1, 2012 8:29 PM
  • Hi Tony

    Your suggestion would work, but is not considered optimal. The danger with re-using a file is that the user sometimes forget to use "Save As", which means the original file would be overwritten. Since you'd have to provide a dotx (AutoText doesn't require macro capability) anyway and that would have to be stored in the user's Startup folder location in order to have the AutoText available automatically, I don't see that as being any easier to use?


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, November 2, 2012 7:30 AM
    Moderator
  • LOL! I think I just took the long way to coming around to your original post. ;)

    Thanks for the posts and keeping at me.

    Best,
    T


    -- Tony

    Friday, November 2, 2012 2:25 PM