Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Edison, New Jersey, USA
    Thanked 0 Times in 0 Posts

    Auto Caption 'must be turned on' (Word XP)

    For my template, I'm wanting to 'forcefully' turn on Auto Captioning for graphics/tables and table gridlines when the user starts my templates. How do I do that? I think I must have to place something in Auto_Open?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Auto Caption 'must be turned on' (Word XP)

    If you want to set something when the user creates a new document based on a template, use the Document_New event in the ThisDocument class module of the template. If you want to do it every time the user opens a document based on a template, use the Document_Open event in ThisDocument. (AutoNew and AutoOpen can still be used, but they are "old-fashioned" relics from earlier versions of Word)

    Before you do this, determine exactly which auto captions you want to activate. Run the following macro:

    Sub ListAutoCaptions()
    Dim ac As AutoCaption
    For Each ac In AutoCaptions
    Debug.Print ac.Name
    Next ac
    End Sub

    This will list all available AutoCaption objects in the Immediate window (press Ctrl+G in the Visual Basic Editor to get to the Immediate window). In your Document_New or Document_Open macro, use instructions like this to turn on auto captioning:

    AutoCaptions("Microsoft Word Table").AutoInsert = True

    where you get the names from the listing you just made. To display table grid line, use

    ActiveWindow.View.TableGridlines = True

Posting Permissions

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