Results 1 to 10 of 10
  1. #1
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    710
    Thanks
    10
    Thanked 33 Times in 27 Posts

    Macro Description (Word 2003 SP1)

    When I record macros, I am not in the habit of typing a description in the Macro dialog box. When I create a macro, there doesn't seem to be a way of adding a description.

    These descriptions would come in **really** handy when assigning macros to a toolbar button when your project and module names are long and you have a dozen or so macros that all start with "Add" and you can't read it in the tiny window that MSoft gives you. <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

    I was able to change the description of my macros in the Macro Dialog Box and they stick -- they seem to be saved in the template where the macro is located. But they don't appear in the Customize box when trying to assign them to a toolbar -- all that appears is "Macro created 2/8/2005 by Kim Murdock" (or "recorded" as the case may be).

    Is there a way of adding or editing a description that will show up in the Customize dialog box?

    Thanks,
    Kim

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Macro Description (Word 2003 SP1)

    I'm using Word 2002 and I don't see any description of macros at all in the Customize dialog...

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Description (Word 2003 SP1)

    I'm using 2000 and, like Hans, I can't see where a macro description appears when customizing a toolbar. You can certainly change the "stored" description: "Macro created 2/8/2005 by Kim Murdock" etc. via the VB Editor (Alt+F11) but I don't know how this will help with the toolbar situation.

    Alan

  4. #4
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    710
    Thanks
    10
    Thanked 33 Times in 27 Posts

    Re: Macro Description (Word 2003 SP1)

    Hans and Alan,

    Thanks for your response. In Word XP and 2003, I see a description when I select one of the macros. See screenshot.

    How can I change the description in VBE? I'd really like to see if the description will display and give me a clue about which macro I'm dragging to the toolbar.

    Thanks again,
    Kim

  5. #5
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Description (Word 2003 SP1)

    Hi Kim

    I didn't notice the "Description" you point out, mainly because nothing at all ever seems to show up there for me! (see below) <img src=/S/sad.gif border=0 alt=sad width=15 height=15> I'm now wondering what's wrong with my setup. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    Given that lack of functionality, all I can suggest is opening the VBE, locating your macro, probably under Modules -> New Macros for the appropriate template or project, and editing the comment line to read the way you'd like it. For instance, locate:
    <code>
    Sub Macro2()
    '
    ' Macro2 Macro
    ' Macro recorded 9/02/05 by Alan
    '
    </code>

    and change it to:
    <code>
    Sub Macro2()
    '
    ' Macro2 Macro
    ' Custom description here
    '
    </code>

    I'd be interested to see if it works, as well as to find out what settings allow this description to appear as you have it. Time to do some digging.

    Alan

  6. #6
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Description (Word 2003 SP1)

    Hi Kim and Allan,

    I recorded a macro and entered a description, which was put in the Sub as a comment. Changing that line in the VBE has no effect on the description in the form you attached. There the original description is displayed.
    But then I exported the module to NewMacros.bas and took a look at that text file. There were 2 extra lines immediately below Sub Macro2, which are not displayed in the VBE (I use a Dutch version, so the recorded text is in Dutch):

    Sub Macro2()
    Attribute Macro2.VB_Description = "Macro opgenomen op 9-2-2005 door JanB"
    Attribute Macro2.VB_ProcData.VB_Invoke_Func = "Project.NewMacros.Macro2"
    '
    ' Macro2 Macro
    ' Macro opgenomen op 9-2-2005 door PeterB
    '
    End Sub

    The attribute line shows the original description. It was not altered by changing it in the VBE.
    I tried changing this attribute using VBA, but no joy; haven't found a way yet. But if somebody really needs this change, (s)he can load the NewMacros.bas file into a text editor, make the changes, and import the module in the VBE. Then the description shows what (s)he wants. Personally I don't think it's worth the effort.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Macro Description (Word 2003 SP1)

    In Word 2002, the description in the Customize dialog seems to be seriously flawed. On my home PC, I don't see a description for any macro in the Customize dialog, hence my previous reply. On my work PC, the description for the first macro in the list is displayed for all macros. It never varies. <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15>

  8. #8
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Description (Word 2003 SP1)

    Hi Jan

    That certainly helps in determining where/ how the mystery descriptions are stored. I have the same situation as Hans. Every macro takes on the same description in the dialog (or nothing at all) and the behaviour is inconsistent. The only way to change the Description shown (useless as it apparently is) is to export, edit the .bas file, then import. There is sweet little mention of the VB_Description property, let alone the problems, in MSDN.

    Thanks for that neat piece of detective work.

    Alan

  9. #9
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    710
    Thanks
    10
    Thanked 33 Times in 27 Posts

    Re: Macro Description (Word 2003 SP1)

    Jan, I agree with you -- it's not worth the trouble at all. I mentioned that I edited the macro descriptions in the Tools > Macro > Macros window. So I exported a macros in its own module and the change I had made displayed in the exported module:

    Public Sub AboutCAPleading()
    Attribute AboutCAPleading.VB_Description = "About the CA Pleading"
    Attribute AboutCAPleading.VB_ProcData.VB_Invoke_Func = "CA_Pleading.About.AboutCAPleading"
    frmAboutBox.Show

    End Sub

    So even changing it in the .bas module won't help. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    What a helpful little tidbit this would be if it actually worked! Otherwise that little Customize window should be bigger, should be sizeable, or should have a horizontal scrollbar!

    Thanks everyone!
    Kim

  10. #10
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Macro Description (Word 2003 SP1)

    Just a little piece of trivia here - in older versions of Word, when you recorded the macro and added a description at that time, this description was clearly visible - in the VB Editor (actually Word Basic) and when looking at the Customize dialog. From memory, I think the description also became a tooltip for the toolbar button. Upgrades and enhancements are wonderful things ...

Posting Permissions

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