Update TOC using macro

Home Forums WordprocessingML Update TOC using macro

This topic contains 4 replies, has 2 voices, and was last updated by  sliu 8 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3780

    sliu
    Participant

    Hi Eric,

    I watched your part 5 of Updating TOC using AutoOpen macro. At the end of the video, you mentioned another approach, that is creating a macro enabled Word document. I assume the macro is similar to AutoOpen, but I don’t know how to invoke the macro. I couldn’t find the screen cast for this approach. Can you describe it for me how to do it?

    Thanks in advance!!!

    #3782

    Eric White
    Keymaster

    Hi @sliu,

    At the time I was working on that screen-cast series, I got diverted to another project, and never recorded the approach using a macro enabled document, and I’m afraid I don’t remember the details. But I still believe it to be possible to create a macro-enabled document. See the following:

    https://support.office.com/en-us/article/Run-a-macro-5e855fd2-02d1-45f5-90a3-50e645fe3155#bmrunmacroautomatically

    Cheers, Eric

    #3796

    sliu
    Participant

    I tried macro enabled Word document. I created AutoOpen and AutoExec macros in my docm. However the macros are not called when Word document opens. I don’t know how to invoke the macros automatically. So I will keep the macro in normal.dotm.

    Thanks

    #3799

    Eric White
    Keymaster

    Just checking – the macro name should be Auto_Open, not AutoOpen.

    It may be that Microsoft has completely removed this feature due to security concerns.

    #3805

    sliu
    Participant

    I tried AutoOpen in .dotm. It doesn’t work. I’m using Office 2016. I think Microsoft has removed this feature. I just save the macro in Normal.dotm. This still works.

    Thanks for your help!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.