Intercept Word Build-in commands using VBA ?

Discussion in 'Word VBA Beginners' started by Jim, Nov 29, 2010.

  1. Jim

    Jim Guest

    Hi all,

    In Word 2007 I'm looking to detect a manual TOC update in order to
    automatically turn OFF and ON Word's Review mode.


    For the moment, the only clues I'm aware of are based on "events catching"
    or
    "functions overloading" techniques.

    * The build-in commands I found are : UpdateToc and UpdateTocFull (got them
    from here : http://www.word.mvps.org/FAQs/General/CommandsList.htm)
    --> but dunno how to intercept them (if it's even possible...).

    * Recording a macro in Word gave me the UpdateTableOfContents function which
    I
    successfully overloaded in the Microsoft "Word Objects > ThisDocument"
    section.
    --> Saddly in this case, the new function would only be triggered if TOC is
    updated through the ribbon and not if a right clic is performed on the TOC,
    followed by the user selecting the "update" option from the contextual menu.


    Well that's all and I'm stuck at this point.
    Got an idea ? How would you do it ?

    Thks in advance,
    Jim.
     
    Jim, Nov 29, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Charles Kenyon

    Intercept FilePrint & PrintPreview

    Charles Kenyon, Dec 3, 2003, in forum: Word VBA Beginners
    Replies:
    1
    Views:
    1,392
    Word Heretic
    Dec 3, 2003
  2. TC
    Replies:
    5
    Views:
    225
    Cindy M -WordMVP-
    Jun 24, 2004
  3. sylvian stone

    using variables in 'insertFile' and 'Open' commands

    sylvian stone, Dec 8, 2005, in forum: Word VBA Beginners
    Replies:
    1
    Views:
    134
    Doug Robbins - Word MVP
    Dec 8, 2005
  4. How to intercept INDEX macro

    , Dec 13, 2005, in forum: Word VBA Beginners
    Replies:
    1
    Views:
    117
    Jay Freedman
    Dec 14, 2005
  5. zSplash

    Intercept ProtectForm event

    zSplash, Mar 11, 2006, in forum: Word VBA Beginners
    Replies:
    2
    Views:
    205
    zSplash
    Mar 12, 2006
  6. Joacim

    Intercept Overtype macro insert Symbol?

    Joacim, Sep 10, 2006, in forum: Word VBA Beginners
    Replies:
    6
    Views:
    210
    Joacim
    Sep 10, 2006
  7. John Clark
    Replies:
    1
    Views:
    160
    Shauna Kelly
    Jul 4, 2007
  8. Mojo
    Replies:
    1
    Views:
    532
    Doug Robbins - Word MVP
    Jun 17, 2010
Loading...