Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Mar 2001
    Location
    Leeds, UK
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Turning off AutoFormat As You Type (Word 97 SR2)

    Is there any way of turning off Automatic Bulleted Lists and Automatic Numbered Lists in a single document/template? I'm thinking that maybe there is a macro I can create in the template which will be called by Word in place of a built-in command, in the same way that you can "catch" a command like FileSaveAs.

    Please don't respond with "You should have them switched off permanently anyway". I agree, but I'm not in a position to enforce that on the organisation I am working for. I would, however, like to exert a little more control in templates developed by me.

    Yours hopefully

  2. #2
    Star Lounger
    Join Date
    Dec 2000
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off AutoFormat As You Type (Word 97 SR2)

    I propose you simply put the following code somewhere in the AutoExec procedure of your global template:

    With Options
    .AutoFormatAsYouTypeApplyBulletedLists = False
    .AutoFormatApplyBulletedLists = True
    .AutoFormatAsYouTypeApplyNumberedLists = False
    End With

    Best regards,

    Stephan

  3. #3
    New Lounger
    Join Date
    Mar 2001
    Location
    Leeds, UK
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off AutoFormat As You Type (Word 97 SR2)

    Hi Stephan

    Thanks for your response. That is just what I don't want to do. My template will be used around the organisation. I cannot force others to turn off AutoFormatAsYouType... options, but I do want them off, if possible, just while they're editing a document based on my template.

    Can anyone think of a way to do it, i.e. disable the AutoFormatAsYouType... options in just one document? Is there a macro that gets called to do the formatting? It's a pity there aren't Activate and Deactivate events associated with documents.

    Ever hopeful

  4. #4
    Star Lounger
    Join Date
    Dec 2000
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off AutoFormat As You Type (Word 97 SR2)

    Andrew,

    Yes, I agree that Word doesn't have Activate and Deactivate events like Excel is bad.

    Basically, your only other alternatives would be:

    (1) to put the code to turn the AutoFormatAsYouType options off in the AutoNew and AutoOpen event procedures, and also write code to turn the options back on in the AutoClose procedure. The problem with this approach, however, is if the user works with more than one document at a time, these 3 Word event procedures are useless.

    or

    (2) simply have a button on a toolbar which will enable the user to toggle the settings (without having to go into Tools | AutoCorrect | etc.)

    Sub ToggleAutoFormat()
    With Options
    If .AutoFormatAsYouTypeApplyBulletedLists = True Then
    .AutoFormatAsYouTypeApplyBulletedLists = False
    .AutoFormatApplyBulletedLists = False
    .AutoFormatAsYouTypeApplyNumberedLists = False
    Else
    .AutoFormatAsYouTypeApplyBulletedLists = True
    .AutoFormatApplyBulletedLists = True
    .AutoFormatAsYouTypeApplyNumberedLists = True
    End If
    End With
    End Sub

    Hope that helps.

    Best regards,

    Stephan

  5. #5
    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

    Re: Turning off AutoFormat As You Type (Word 97 SR2)

    Warning: I'm not talking about anything I've done, yet, here, just what I've read about.

    You should be able to use document events (perhaps with a class module) to identify when your document has or loses the focus. See the Word <A target="_blank" HREF=http://www.mvps.org/word> MVP site</A> VBA articles on using document events to mimic AutoOpen, etc. procedures.
    Charles Kyle Kenyon
    Madison, Wisconsin

  6. #6
    New Lounger
    Join Date
    Mar 2001
    Location
    Leeds, UK
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Turning off AutoFormat As You Type (Word 97 SR2)

    Thanks, Chas. That's very interesting, as I'd not noticed Application events before.

    The Application object offers a DocumentChange event which can be handled in a document. There always seems to be a "But" doesn't there? In this case, the catch is as follows:
    <hr>If you have open more than one document handling Application events, both documents see the event, but they are always fired in the same order - the order in which the application objects were initialized. This means that you can't create the equivalent of "Activate" and "Deactivate" events and guarantee that the "Deactivate" event of the deactivated document will fire before the "Activate" event of the activated document.<hr>
    Thanks for your help. I'm glad to say I've learnt something useful, though I don't think I can apply it for this particular problem. <img src=/S/sigh.gif border=0 alt=sigh width=15 height=15>

Posting Permissions

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