• Template Dialog Macro? (Word 2002)

    Author
    Topic
    #399810

    Does anyone know how to set the default when opening the template dialog so it displays as a LIST instead of ICONS. Note, am using a customized toolbar button to open the Template (File, New) dialog box instead of the task pane. When the dialog opens, It is too hard to read the names of all the templates when they display as ICONS. It is a pain in the neck to have to click on LIST every time.

    Ideally, I would like it to go to the MORE… category (tab) since we have many categories. I have tried to write a macro to do all of this using the SHOW and wdDialogFileNew but can’t figure out how to set properties (LIST and the MORE tab) when it opens.

    Peg

    Viewing 1 reply thread
    Author
    Replies
    • #775036

      The macro in the attached document was posted on LawNet. Hope it helps.

      • #775046

        Works great to display templates in LIST format. Now I would like to take it a step further, and Choose a specific category or tab within the template dialog.

        Thanks for your help.

        • #775103

          (Edited by jscher2000 on 27-Jan-04 13:32. I guess using % next to 2 is a no-no in a Lounge post.)

          If you play with the dialog a bit, you can see that Ctrl+Shift+Tab rotates from the currently visible tab, usually General, to the last tab, usually More.

          Taking advantage of that behavior, you can modify the posted macro as follows:

          Sub FileNew()
          SendKeys “$2+^{TAB}”
          Dialogs(wdDialogFileNew).Show
          End Sub

          (Switch the $ to a %)

          The bad news is, if the user previously created a new document from a tab that is normally visible, Word may display that tab instead of the General tab, and then going back one tab doesn’t do what you want. But… that’s all I have for now.

          • #775124

            Got to be a way to get to a specific tab? The only way Iogically that I can think the Shift+tab thing could work is IF there was a way to RESET the dialog back to the General Tab, the way it is when you first open Word. Thanks again.

          • #775125

            Got to be a way to get to a specific tab? The only way Iogically that I can think the Shift+tab thing could work is IF there was a way to RESET the dialog back to the General Tab, the way it is when you first open Word. Thanks again.

          • #775322

            Good news, When you move between Custom Template categories (vs the categories that come WITH Word), the template dialog box always goes back to General. So the Shift+Tab trick works unless you happen to choose one of the Word categories. So this might have to be the solution until I find something better.

            BIG THANKS for all of the suggestions.

            • #776025

              It is possible to set a specific tab as the default when opening a dialog:

              Dialogs(wdDialogFileNew).DefaultTab = xxx

              As soon as you type the “=” you get a pop-up list with all the possibilities. Unfortunately this list contains all tabs, not just the ones for the dialog you want (wdDialogFileNew in this case).

              Hope this helps.

              JanB

            • #776153

              I did try :
              Dialogs(wdDialogFileNew).DefaultTab = xxx
              When the pick list comes up, there are no options for DialogFileNew. That particular dialog isn’t listed????? I really want to pick the “More” tab, but maybe it can’t be done??? I tried typing my own tab name, but to no avail.
              Thanks Jan.

            • #776159

              The FileNew dialog is a special case; its tabs are not all hard-wired as for, say, the Tools | Options dialog. They are a mixture of various items. I guess that’s why there is no listing of those tabs in the pick list. SendKeys is probably the only option, but you can’t trust it to work reliably across different installations.

            • #776160

              The FileNew dialog is a special case; its tabs are not all hard-wired as for, say, the Tools | Options dialog. They are a mixture of various items. I guess that’s why there is no listing of those tabs in the pick list. SendKeys is probably the only option, but you can’t trust it to work reliably across different installations.

            • #776161

              I typed that on the fly and did not check if there are any items in the pick list for the FileNew dialog.
              Sorry that this is no solution for your particular issue. But look at the bright side: you learned something. grin
              And I did too…!

              JanB

            • #776162

              I typed that on the fly and did not check if there are any items in the pick list for the FileNew dialog.
              Sorry that this is no solution for your particular issue. But look at the bright side: you learned something. grin
              And I did too…!

              JanB

            • #776191

              Yes, I did learn something. I had researched that default tab command previously and had concluded it only had very limited options. (I wasn’t using it totally correct and I appreciate your illustration). The post from Hans about Send Keys not always being reliable across different installs has also proved true. I can reliably set the template dialog to show in List view with Send keys, but I still have no reliable way to get to the More tab. I had even tinkered with several little macros to get to the various categories (tabs) and then putting all of the macros on a menu, but again I get stuck because there doesn’t seem to be a way to tell the macro to show the template dialog with a specific tab active. I was using Ctrl+Shift+Tab via Send Keys. Does anyone know a way to use Send Keys specifying a specifc tab. I again have researched to no avail. Drat! Thanks all, I am smarter but still not happy with solution or lack there of confused .

            • #776192

              Yes, I did learn something. I had researched that default tab command previously and had concluded it only had very limited options. (I wasn’t using it totally correct and I appreciate your illustration). The post from Hans about Send Keys not always being reliable across different installs has also proved true. I can reliably set the template dialog to show in List view with Send keys, but I still have no reliable way to get to the More tab. I had even tinkered with several little macros to get to the various categories (tabs) and then putting all of the macros on a menu, but again I get stuck because there doesn’t seem to be a way to tell the macro to show the template dialog with a specific tab active. I was using Ctrl+Shift+Tab via Send Keys. Does anyone know a way to use Send Keys specifying a specifc tab. I again have researched to no avail. Drat! Thanks all, I am smarter but still not happy with solution or lack there of confused .

            • #776154

              I did try :
              Dialogs(wdDialogFileNew).DefaultTab = xxx
              When the pick list comes up, there are no options for DialogFileNew. That particular dialog isn’t listed????? I really want to pick the “More” tab, but maybe it can’t be done??? I tried typing my own tab name, but to no avail.
              Thanks Jan.

            • #776026

              It is possible to set a specific tab as the default when opening a dialog:

              Dialogs(wdDialogFileNew).DefaultTab = xxx

              As soon as you type the “=” you get a pop-up list with all the possibilities. Unfortunately this list contains all tabs, not just the ones for the dialog you want (wdDialogFileNew in this case).

              Hope this helps.

              JanB

          • #775323

            Good news, When you move between Custom Template categories (vs the categories that come WITH Word), the template dialog box always goes back to General. So the Shift+Tab trick works unless you happen to choose one of the Word categories. So this might have to be the solution until I find something better.

            BIG THANKS for all of the suggestions.

        • #775104

          (Edited by jscher2000 on 27-Jan-04 13:32. I guess using % next to 2 is a no-no in a Lounge post.)

          If you play with the dialog a bit, you can see that Ctrl+Shift+Tab rotates from the currently visible tab, usually General, to the last tab, usually More.

          Taking advantage of that behavior, you can modify the posted macro as follows:

          Sub FileNew()
          SendKeys “$2+^{TAB}”
          Dialogs(wdDialogFileNew).Show
          End Sub

          (Switch the $ to a %)

          The bad news is, if the user previously created a new document from a tab that is normally visible, Word may display that tab instead of the General tab, and then going back one tab doesn’t do what you want. But… that’s all I have for now.

      • #775047

        Works great to display templates in LIST format. Now I would like to take it a step further, and Choose a specific category or tab within the template dialog.

        Thanks for your help.

    • #775037

      The macro in the attached document was posted on LawNet. Hope it helps.

    Viewing 1 reply thread
    Reply To: Template Dialog Macro? (Word 2002)

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

    Your information: