• Menu IDs problem with foreign versions (2000 – 2007)

    Home » Forums » AskWoody support » Productivity software by function » Productivity software by function – other » Menu IDs problem with foreign versions (2000 – 2007)

    Author
    Topic
    #451199

    On a French version of Office 2003 I encounter an error 5 on the following. I suspect I need to make use of some MS menu IDS rather than hard coded (“File”) as done. Where do I find the IDs for these?
    Application.CommandBars(“File”).Controls(“Send To”).Controls(“Mail Recipient (as Attachment)…”).OnAction = “”

    Viewing 0 reply threads
    Author
    Replies
    • #1110202

      You can type the following in the Immediate window:

      ? Application.CommandBars(“File”).Controls(“Send To”).Controls(“Mail Recipient (as Attachment)…”).ID

      and press Enter.

      • #1110504

        Thank you Hans. Isn’t there a list of all of these IDs shjowing their Microsoft reserved Paramaters for these? I know I have seen something like that but can’t find it.

        • #1110506

          You can generate such a list yourself:

          Word: How to Generate a List of Command Bar Names, Captions, and ID Numbers

          Excel: post 529,988

          To create a similar list for other Office applications, you could use Automation from within Word or Excel.

          • #1110527

            As I understand it, using menu names like “Application.CommandBars(“File”).Controls(“Send To”)” should work in a foreign language version as well even if the menu itme “File”, “Send To” do not have the same spelling.

            • #1110528

              I have the Dutch language version of Office XP. CommandBars(“File”) is understood OK even though the File menu has a different name in Dutch, but I *must* use the Dutch names of the menu items. Application.CommandBars(“File”).Controls(“Send To”) causes Error 5 in my version. So if you want your code to be used in non-English versions, you should use the ID, in this example Application.CommandBars.FindControl(ID:=30095). This works in all versions.

    Viewing 0 reply threads
    Reply To: Menu IDs problem with foreign versions (2000 – 2007)

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

    Your information: