Results 1 to 13 of 13
  1. #1
    Star Lounger
    Join Date
    Jan 2011
    Location
    Illinois
    Posts
    62
    Thanks
    17
    Thanked 2 Times in 2 Posts

    Word 2010: Make a style available regardless of document origin

    Hi, everyone. I have a created a style called "feedback" that I want to be able to access regardless of where the document originated (I am a teacher grading work). I know how to create a new style, and I know how to save one to the Normal template, but I'm wondering if it's possible to save it on my machine and have it available for any document that I open.

    Thanks for any ideas!

    Val in cloudy IL

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    Val

    I think your best option is to use a macro which creates the style the way you want it and put a button on your QAT which runs the macro. I would probably try to create the macro in such a way that it:
    1. If style doesn't exist: create it
    2. Apply the style to the current selection

    Let us know if you need help to create the macro.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Val,

    I agree with Andrew. But just to clarify, if you save a style to your Normal template it is available to any document you open. Unfortunately, you need to copy the style to your open document in order to use it. You can do this through the Organizer, which is available on the Developer Tab > Templates Group > Document Template button. In the dialog that appears, click the Organizer button in the lower left. You can also add the Organizer to the QAT -- display all commands and find "Organizer".

    When you have a document open, then open the Organizer. The Styles tab is usually already displayed. The open document's styles will be on the left, the styles in Normal.dotm on the right. Select your feedback style and copy to the other document.

    But this is quite a bit more trouble than what Andrew is suggesting, especially when you want to do it over and over. You'd only want to go through the steps I've described every once in a while.

    However, you could have a macro do the copy for you. Place the macro on the QAT as Andrew suggests and click when you open a new document.

    Best, Kim
    Last edited by kmurdock; 2013-04-07 at 18:44.

  4. #4
    4 Star Lounger
    Join Date
    Jan 2010
    Location
    Chichester, UK
    Posts
    401
    Thanks
    1
    Thanked 10 Times in 9 Posts
    The easiest way is to utilise the Workgroup Template option. If you go to Word Options, Advanced, scroll to the bottom for File Locations, you'll see an entry for Workgroup Templates.

    Ordinarily, this points to a location of a file server so that everyone in a company workgroup can locate Templates globally, so that they are all singing from the same hymn sheet. However, if you are a single user, you can utilise this feature just for yourself.

    Create a folder on your computer and call it MyWorkgroup. Go to the advanced setting in Word and point Workgroup Templates to this new local folder.

    Then create a template containing any style that you want to be GLOBAL on your computer. Save it to the Workgroup folder you created. Now when you start Word, the global styles will be available to all documents. You can use this to make styles, autocorrect and anything that is normally stored in the normal template available globally to all your Word documents regardless of which template is attached and not those just based on the normal template.
    Last edited by TerFar; 2013-04-09 at 10:10.

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    TerFar
    Are you sure about this? In my experience this is NOT how Workgroup Templates work.

    For starters, any document/template you create has a minimum number of styles (267) contained in it so you are dealing with a lot of styles contained in a single template not just one.

    Secondly, the Workgroup folder was intended as a trusted location for 'attached templates' rather than the location for 'global templates'. That is what the Startup Folder is for.

    Thirdly, you can't access styles from a global template simply by having it active as a global template. You can import styles from an attached template but this can be very fiddly if you only want one style to be imported. Global templates give you access to building blocks and macros but not the styles. Attached templates give you access to their styles but only if you refresh styles on open (an optional document setting) and even then it will import all styles which is not what the OP wanted.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Quote Originally Posted by TerFar View Post
    The easiest way is to utilise the Workgroup Template option. If you go to Word Options, Advanced, scroll to the bottom for File Locations, you'll see an entry for Workgroup Templates.

    Ordinarily, this points to a location of a file server so that everyone in a company workgroup can locate Templates globally, so that they are all singing from the same hymn sheet. However, if you are a single user, you can utilise this feature just for yourself.

    Create a folder on your computer and call it MyWorkgroup. Go to the advanced setting in Word and point Workgroup Templates to this new local folder.

    Then create a template containing any style that you want to be GLOBAL on your computer. Save it to the Workgroup folder you created. Now when you start Word, the global styles will be available to all documents. You can use this to make styles, autocorrect and anything that is normally stored in the normal template available globally to all your Word documents regardless of which template is attached and not those just based on the normal template.
    Like Andrew, this has not been my experience. To make a template global you need to have it (or a shortcut to it, I think) in the Word Startup folder. However, styles in global templates other than Normal.dotm are not available in all documents. My experiences with Global Templates are outlined here and in my general Templates chapter. I am open to new learning though.

    I have outlined a macro procedure in A Global Style Sheet in Word? If the macro and styles are in the same template and the template is made global, it is relatively easy to use a keyboard shortcut (also stored in the global) to import styles into the active document. The macro was written for Word 2000 but still works fine in Word 2010.
    Charles Kyle Kenyon
    Madison, Wisconsin

  7. #7
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Dallas, Texas, USA
    Posts
    113
    Thanks
    3
    Thanked 6 Times in 6 Posts
    Kim,

    Quote Originally Posted by kmurdock View Post
    Val,

    Unfortunately, you need to copy the style to your open document in order to use it.

    Best, Kim
    Unless there has been a change that escaped my notice, this is not strictly true. If you use a style in a document, a copy of the style, as it exists at the time, is copied into the document, and saved with it. Thereafter, when you modify the style within that document, the local copy is changed, while the master copy in the template remains unchanged, unless you tick the box that instructs Word to apply the changes to the attached template, too.

    As an example, I have a template, WW_Publication.DOTX, that has a standard Heading 1 style that displays the text of a paragraph tagged with it in Arial Bold, small caps, at a certain size and in a certain color. When I create a document based on that template, I have immediate access to that style, unless I confine my selection to Styles In Use.

    Frequently, after I have applied the Heading 1 style to several paragraphs, I decide that I want each Heading 1 paragraph to start on a new page. I select the style in the Style Gallery, modify it, and display the Paragraph tab, from which I select the "Page Break Before" option, which creates the desired effect.

    Since I don't tell Word to update the template, the effect of the change is confined to the active document. The next document that I create based on WW_Publication.DOTX gets the original Heading 1 style, which keeps the paragraph on the current page, if it fits.
    David Gray, Chief Wizard
    WizardWrx
    Irving, Texas, USA

    WizardWrx Web - Technical Articles and Free Software
    You are more important than any technology we may employ.

  8. #8
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by TXWizard View Post
    Kim,

    Unless there has been a change that escaped my notice, this is not strictly true. If you use a style in a document, a copy of the style, as it exists at the time, is copied into the document, and saved with it. ...
    Hi TXWizard,

    I have found what you describe to be true as well, but to clarify, my statement was made in the context of the question posed by Val in her first message, which referred to a document that does not have the desired style ("feedback") already in it.

    But it did make me think that if Val copies and pastes a paragraph already formatted with the feedback style into her student's documents, the style will travel with it, effectively copying the style. This should work perfectly as long as 1) there isn't a style named "feedback" already in her student's documents, and 2) as long as File > Options > Advanced > Cut, Copy, and Paste section > Pasting between documents: is set to Keep Source Formatting (which is the default).
    But still and all it seems much easier to set up a macro that runs at the click of a button.

    Best, Kim

  9. #9
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts

    Paint with Styles

    ... if Val copies and pastes a paragraph already formatted with the feedback style into her student's documents, the style will travel with it, effectively copying the style. ...
    Here's another idea along the same lines. Much like my previous suggestion, Val will need a "source" document with the feedback style in it, and applied to at least one paragraph.

    Open the source doc and one of your "target" docs. Arrange the two docs side-by-side (or at least with both visible so you can click between them -- easier to keep straight what you're doing).
    • In the target doc, type a sentence of the paragraph that needs the feedback style.
    • In the source doc, click into a feedback-styled paragraph.
    • On the Home tab > Clipboard group, double-click on the format painter (the small paintbrush).
    • Now click in the target doc and select your sentence/paragraph (your cursor should look like a little paintbrush).
    • Once you've painted the paragraph, press the esc key to decommission the paintbrush tool (or click the Format Painter button again).

    This transfers the style to the target document. (Also, you'll discover subtleties of the Format Painter as you use it.)

    Again, not sure it's as easy as a button on the QAT, since what Val originally asked about was transferring feedback to each document she reviews.

    But it's an alternative, and knowing that you can paint a style is a great tip for style users as well as style phobics.

    Best, Kim

  10. #10
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    An extremely simple method of copying new Styles from a source document to a set of target documents is to create a series of paragraphs using those Styles in the source document (if they're paragraph Styles, the paragraphs don't need any text), add the following macro to the source document, open the source document and all the target documents, then run the macro.
    Code:
    Sub AddStyles() 
        Application.ScreenUpdating = False 
        Dim Rng As Range, i As Long 
        If Windows.Count = 1 Then Exit Sub 
        ThisDocument.Range.Copy 
        For i = 1 To Windows.Count 
            Windows(i).Activate 
            Set Rng = ActiveDocument.Characters.Last 
            With Rng 
                .InsertAfter vbCr 
                .Collapse wdCollapseEnd 
                .Paste 
                .Delete 
            End With 
        Next 
        Set Rng = Nothing 
        Application.ScreenUpdating = True 
    End Sub
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  11. #11
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Dallas, Texas, USA
    Posts
    113
    Thanks
    3
    Thanked 6 Times in 6 Posts
    Overall, I prefer Kim's method of painting with style, because it doesn't require a macro. As such, her method is readily accessible to all users; no programming is required. Further, using macros imposes a couple of nontrivial chores.
    1. Where to store the macro
    2. What hotkey and/or QAT item to assign to it


    Additionally, if you run a secure installation of Microsoft Office, which I do, every VBA project must be digitally signed and timestamped, using a Class 3 Code Signing Certificate issued by a trusted Certificate Authority, such as VeriSign, Thawte, GlobalSign, or GeoTrust.

    When I started using Microsoft Word (Word 6, in Office 4.2 on Windows for Workgroups 3.11), I very quickly discovered templates. Since then, I've developed a small, but serviceable, collection of templates, each of which contains the styles that I need most often when developing a particular kind of document (business letter, personal letter, publication/handout, etc.). Additionally, my Normal.DOTM contains the styles that I use most often. When I start a new document, I create the new document based on the template that contains most of the styles that I anticipate needing.

    Since my default style view is Available Styles, I have ready access to the styles in both Normal.DOTM and the template on which I based the document. When I am revising a document, I may switch to the Styles in Use view, since this is usually a much more concise list.
    David Gray, Chief Wizard
    WizardWrx
    Irving, Texas, USA

    WizardWrx Web - Technical Articles and Free Software
    You are more important than any technology we may employ.

  12. #12
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    I think your concerns about the macro approach are overdrawn.
    Re 1: As stated in my post, the macro is meant to be stored in the document containing the Styles. Preferably you'd keep it in a Trusted Location.
    Re 2: You don't need a "hotkey and/or QAT item". You simply open the macro document and target documents, press Alt-F8 then select and run the macro. Hardly a complicated job.
    As for:
    if you run a secure installation of Microsoft Office, which I do, every VBA project must be digitally signed and timestamped, using a Class 3 Code Signing Certificate issued by a trusted Certificate Authority
    most of us mere mortals can get by without any of that by, at most, running the macro from a trusted location or by allowing the macro to run when prompted.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  13. #13
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Macro for copying styles.

    A very elegant macro Paul. Thank you. I have to put it in my bag of tricks.

    Would you mind if I add a modified version as an alternative in my StyleSheet page. The modification would make it apply only to one active document. The macro would be put in a global template built just to hold the styles. In the meantime, I've inserted a link to this thread.

    Here is what I've come up with for that macro. I still need to do a bit more testing. It should, though, when loaded in a global template, copy the styles in the body (document part) of the template into the active document. It would be best accessed through a keyboard shortcut on a QAT button. I would prefer the keyboard shortcut because it can be stored in the global template. Storing a QAT button in a global template is possible but not easy.

    Code:
    Sub AddStyles1()
    '   Posted by Paul Edstein 2013-04-17 Modified by Charles Kenyon
    '   http://windowssecrets.com/forums/showthread.php/153328-Word-2010-Make-a-style-available-regardless-of-document-origin?p=901172&posted=1#post901172
    '   Used to copy styles from thisdocument to all open documents
    '   There must be text/paragraphs in the desired style in thisdocument - the template holding this code
    '
        Application.ScreenUpdating = False
        Dim Rng As Range ', i As Long
    '    If Windows.Count = 1 Then Exit Sub
        ThisDocument.Range.Copy
    '    For i = 1 To Windows.Count
    '        Windows(i).Activate
            Set Rng = ActiveDocument.Characters.Last
            With Rng
                .InsertAfter vbCr
                .Collapse wdCollapseEnd
                .Paste
                .Delete
            End With
    '    Next
        Set Rng = Nothing
        Application.ScreenUpdating = True
    '   Commented out cycling through all active documents - will work on current active document only
    '   Designed to be placed in a global template and accessed through a QAT button or keyboard shortcut
    '       Keyboard shortcut can be stored in the template holding this code
    '       That template can be made into a global template by placing in Word's startup folder
    End Sub
    Last edited by Charles Kenyon; 2013-04-23 at 11:11. Reason: add code
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •