• Turn off Automatically Update Document Styles (Office 2000 SR1)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Turn off Automatically Update Document Styles (Office 2000 SR1)

    Author
    Topic
    #361805

    Afternoon all. Question for you.

    Here’s the situation. I have created a customized normal.dot for our Win2K/Word2K users, specifying default styles and etc. I create a new document and apply a List Bullet style. At this point I save the
    document. Then I modify the List Bullet style (changing font, bullet style, whatever…it doesn’t matter) and save the document again. Then I close the document. When I reopen the document, it does not reflect the modified styles.

    I get the same behaviour regardless of the style I modify (in other words, this isn’t related to the style itself).

    My question is…what is going on? We are also running MacroSuite, but I have eliminated that as the cause of the problem; the behaviour is the same without MacroSuite integration. I also removed our firm startup template, and that is related to the problem either. However, if I delete my custom normal.dot, the scenario described above works correctly and the style modifications are saved with the new document.

    Any thoughts? At all? Please? This normal.dot is based on the normal.dot we used for our Word 97 clients, and we had no problems with this. I feel like I’m losing my mind. I’m really trying to find out how to programmatically turn that option OFF for ALL documents by default.

    Thanks in advance for any assistance…

    klyjen

    Viewing 3 reply threads
    Author
    Replies
    • #547991

      Hi klyjen:

      Gary Frieder wrote a macro to remove automatically update from all styles. It is:

      Macro: RemoveAutomaticallyUpdate
      Sub RemoveAutomaticallyUpdate()
      Dim aSty As Style
      For Each aSty In ActiveDocument.Styles
      If aSty.Type = wdStyleTypeParagraph Then
      aSty.AutomaticallyUpdate = False
      End If
      Next aSty
      End Sub

      There is an odd side-effect to running this macro: it will cause all of the styles (including built-in style) to appear in the styles pull-down list – it’s kind of like Word considers all these styles now “in-use” since the macro has interacted with and changed each of them.

      If the desired outcome is to remove the “automatically update” property from just selected styles, but while avoiding the odd side-effect above, it would be pretty easy to get the macro to only change the setting for specific styles such as the TOC ones.

      If you’re not having this problem with the default normal.dot, could it be an Auto macro that you’ve included with your custom template that’s causing the problem. I assume that you’re modifying the style itself & not merely adding direct formatting to it.

      Hope this helps.

      • #547994

        Hi Phil.

        Actually, it isn’t that I want to remove “automatically update” from any given style. The problem is (and see my response to JustCallMeAl) that the Automatically Update Document Styles (under Tools|Templates and Addins) is automatically turned ON, which means any changes I’ve made to styles in a particular document are lost once the document is re-opened (my original scenario). Obviously, we can turn this off on a case by case basis, but I really want to set it so that it doesn’t DEFAULT to the “on” position.

        However, your macro may come in useful somewhere else, so I’ll keep a copy…thanks!

        Jen

        • #548023

          Hi Jen:

          You’re right. I misread the problem & that macro will turn off “Automatically update” in the style box for all styles. Microsoft uses too many “automatically etc.”. But I think Klaus has hit the problem. Your normal.dot probably has “Automatically update document styles” turned on. I think you can just open normal.dot itself & make the change.

    • #547992

      Argh. I’m sorry…I copied/pasted that post, and clearly got the wrong part although I remembered it in the subject line….but it doesn’t seem like I can edit the post…?? In any event…

      Yes, that check-mark is checked. For every new document. I have tried a couple of different vb coding tricks to attempt to turn it OFF for every new document, but I can’t seem to control it. What I’d really like to find out is how I can ensure that this setting is turned off for each new document.

      Thanks again, and I apologize for the confusion…

      klyjen

    • #548000

      Hey again Al. Yup, that’s exactly the situation. If you think of anything, let me know…

      • #548007

        The code to turn this off looks like

        ActiveDocument.UpdateStylesOnOpen = False

        Normally I don’t have the problem that it is on by default so I assume you have a macro that runs automatically to do this for you. If you can isolate it then you will solve the problem

        • #548011

          I think I have found a way to create that strange behaviour:

          Make a new document, for example based on Normal.Dot,
          Check the “Automatically Update Document Styles” under Tools, Templates and Addins,
          Save as Normal2.DOT (as a template).
          Rename Normal.DOT to Normalold.DOT, and Normal2.DOT to Normal.DOT, and all new documents will have the setting!

          So it would be best to rename your normal.DOT to let Word create a new one, and copy any customiozations to that virgin Normal.DOT.

          cheersKlaus

          • #548052

            Or, more simply, just locate the existing Normal.dot, open it, go to the Tools >Templates & Add-Ins, turn off the checkmark, OK, Save and Close (as Phil also suggests below).

            And to second Charles’ comments, it’s best not to use Normal.dot for the purpose described anyway – ‘workgroup’ and global templates are a better way to go.

            Gary

            • #548103

              Morning all.

              Andrew Lockton: Yes, I have that code. I’ve added it into my normal.dot and it doesn’t fire (or something else overwrites it).

              Phil/Klaus/Gary: Actually, I’ve tried that … I’ve tried to modify the normal.dot and turn off the setting; it doesn’t save it. This is why I feel like I’m going nuts!

              Charles: We are a law firm, and we create a default normal.dot for users to define our base settings (like font, heading styles, etc.) rather than requiring that users set those themselves. Our goal is to only provide the normal.dot once; we do not push it down to users on a regular basis, because we want them to be able to make their own modifications to styles and other formatting based on their own practices. The problem is, we can’t control what font and style definitions are part of a “virgin” normal.dot, so we have to create it ourselves. For example, our firm uses the Garamond 12 pt font for all documents. And, we have specific styles that need to be available to all documents regardless of the document template.

              And as for the numbering…the problem is not related specifically to styles with numbering/bullet attributes. That was just what I used as an example.

              I will try letting Word create its default normal.dot and then copy my settings into that per Klaus’s suggestion; maybe that will resolve it.

              Thanks to everyone for your responses…

              Jen

            • #548139

              Ah, look at that. I found an edit post button.

              Cool.

              In any event, Klaus’s suggestion worked, sort of; the normal.dot that Word first had the setting turned on again. I deleted *that* normal.dot again, and I let Word create a second normal.dot (finally, that setting was gone). Then re-did all of my customization. So, thank you Klaus!

              I’m still confused, though…I have searched through my normal.dot (the old one) in the VBA editor multiple times for the code Andrew Lockton mentioned earlier, and it doesn’t appear anywhere in the template as far as I can see. Is it possible to have “hidden” code in the normal.dot?

              In any event, thanks to all of you for your help.

              Jennifer Klyse

            • #548847

              Hi Jennifer,

              Tools > Templates and Add-Ins > Automatically update document styles:
              There isn’t any code needed for that setting to be checked in the template.

              In a normal template, “Automatically update document styles” is de-activated and can’t be activated.
              But if you have a document with that setting checked and save it as a template, it stays activated and can’t be un-checked.
              So all new documents based on that template will have the setting.

              I reported this as a bug to Microsoft.

              cheersRegards, Klaus

    • #548049

      Hi,

      1) IMO you do not want to be creating a customized normal.dot for people any more than you want to be reorganizing their personal desk drawers. You should be using a combination of global and document templates.

      2) Bullets and numbering are governed by the list templates (which have very little to do with what Word calls templates under all other circumstances). Per John McGhie – who is nearly always right about such things – the formatting in the list template will override the formatting of the style.

      3) I would recommend you read Word’s Numbering Explained by John McGhie
      Cure Word’s Numbering Problems with a Dose of VBA by Dave Rado (unfinished but good links)
      and perhaps
      Numbering Chapter of Intermediate Users’ Guide to Word

      Hope this helps,

      • #556480

        Morning all. I’m adding this back to this thread instead of starting a new one, since it’s a continuation of the same problem.

        We’ve been having some problems with the “Automatically Update Document Styles” property being activated on some documents. We thought it was our Win2K image, MacroSuite, or something else in our Office2000 package. Thankfully, it wasn’t.

        I discovered today that the problem is in the normal.dot many of our users still on Win95 machines with Office97 have been using. Apparently, somehow this property was activated for those users. (We aren’t sure how, exactly, as the window to access this setting was not even available to our 97 users; we had removed that option from the menu.) And, it did not appear to have caused any problems for users in 97; they didn’t lose document-specific changes to their styles. In any event, we now have an untold number of documents sitting out there with this setting activated. This leads to my question. Actually, my TWO questions.

        1. We will continue to have users on Office97 with potentially problematic settings in their normal.dot files for at least a few months. I would prefer not to simply push down a new normal.dot to all of those users; as you know, they’d lose any customization they’ve done. Do any of you know of a way to script something in a batch file that would go to each user’s normal.dot and turn that off, so that all documents they create from now going forward would be safe once they are in 2000?

        2. Second, I still have the issue of users in Win2K/Office2K who are opening their old documents and losing all of their document-specific style modifications. I would like to find out if there is (a) a way to disable that automatic update across the board before it happens, perhaps with something in a startup template or something that is called on File|Open, or ( if there is a way to uncheck that option on a document-by-document basis, again at the File|Open prompt (so that the document styles are NOT updated).

        Any thoughts on any of this would be greatly appreciated. Thank you.

        • #556982

          On point 1, perhaps you can get them all to run this from a document you make centrally available to e-mail to them:

          Sub NormalUpdateOff()
          Dim docNormTemp As Document
          Set docNormTemp = Documents.Open(Options.DefaultFilePath(wdUserTemplatesPath) & _
              Application.PathSeparator & "normal.dot")
          docNormTemp.UpdateStylesOnOpen = False
          docNormTemp.Saved = False   'force save on close
          docNormTemp.Close wdSaveChanges
          Set docNormTemp = Nothing
          End Sub

          On point 2, I have not experimented with the sequence of events on open, but perhaps there is another way. Until the updated document is actually saved, you can copy the original styles from the document on disk using the Organizer (Tools, Macro, Macros… Organizer…

          • #557015

            Hi Jeff,

            I’ve just saved a copy of your macro for future use. thumbup

            Re: point 2 – it still seems that a strategy like this would not work because the document styles will all get updated, as part of the file open event, so anything you do after the document is opened will be after the fact i.e. the existing style definitions in the document will have already been overwritten.. (?)..

            Gary

            • #557371

              Gary, weirdly enough, it works when you (1) manually change a style, then (2) pop up the Organizer and copy that style from the file on disk back into the open document. I didn’t test it under the auto-update scenario.

          • #557073

            Thanks for the suggestion. I ended up writing something similar, except that it runs through each of the user directories (we’re using roaming profiles), finds the normal.dot, opens it, makes the change to that setting, saves it, and closes it. As nice as it would be to have my users run something, I know that they won’t, so I need to handle it myself.

            As to point 2, I’ll need to play with that; I’m not sure it will work. However, along the same lines as what I’ve mentioned above, I’ve found some code that will go through all of the files on our server, find all of the .DOC files based on the normal.dot, and make this change (opening them in Word 97, so that document-specific style modifications aren’t lost). Most of the code is stuff I found online or in Duncan Mackenzie’s Word 2000 VBA book, and it works fine for a single directory or even a small number of files. The problem is, I need to run it over 500 directories that each have an unknown number of documents in them. My code builds an array with each combination of directory/file, and the array got too big before it even got to the open/edit/save/close part of the code. I was running this from a pretty beefy server, and it still ran out of memory.

            What I need to do is figure out how to tell the code to first build an array of all of the directories, then go to the first item in that array, build a second array of all of the documents in that directory, run the fix, clear out that second array, go back to item 2 in the first array, build a 2nd array of all of the documents in *that* directory, run the fix, clear out the second array, etc etc.

            I’m attaching the document with my code here (I’m running the MakeSummary macro to start this–it generates a word document listing all of the files that were modified). If you wouldn’t mind taking a look at the code, I’d appreciate it. I’m still working on it, but I just took a VBA class in November, and I’m clearly not an expert yet!

            And one more comment…my gut tells me that the FindFile procedure needs to be modified–perhaps that will give you a place to start.

            Thanks in advance for any assistance…

            • #557211

              Hello Klyjen

              Probably the easiest way to get your list of all word files over several directories would be a simple dir command in the dos box redirected to a text file. (E.g. “Dir *.Doc /S/B > files.txt”) This will produce a text file containing all word files including their path. You might then simply open the text file and process each line until you reach the end of the file.
              Of course this needs some manual interference for generating the text file, but the dir command certainly runs much faster than any array filling VBA routine.

              Perhaps this would be a functioning workaround.

            • #557354

              Thanks hedgehog. I’ve actually figured out a way to do this, and it’s working. The only remaining issue is determining if a particular document is already open before my code attempts to open it. I can’t do what I need to do if the document is currently open by another user, but this is the last condition I need to check.

              klyjen

    Viewing 3 reply threads
    Reply To: Turn off Automatically Update Document Styles (Office 2000 SR1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: