• Dropdowns and Ref (Word 2002)

    Author
    Topic
    #437870

    I’m working with many templates that require the ability to select from several company names. The company name may appear several places in the document. I thought that I would use the Forms toolbar Dropdown function and then Ref to reference the selected company name. This seems to work as expected except that the company names contain the “&” character, which doesn’t show up for the dropdown field (it does show for the Ref field).

    Anyone have a solution? I use AutoText in other templates to select the office, but that is where the company name only appears once. I don’t reference the field again in the document.

    Is there any trick to get that “&” to appear in the dropdown?

    Viewing 0 reply threads
    Author
    Replies
    • #1042328

      You can make the ampersand appear in the dropdown by doubling it (for example Sam&&Max). You’ll see one ampersand in the dropdown, but now, you’ll get two ampersands in the Ref field, which is probably not what you want.
      I’d replace the ampersand with the word and.

      • #1042354

        Thanks for the response, Hans.

        I tried to enter 2 ampersands, but it still didn’t show in the dropdown and did show twice in the reference.

        I can’t change the company name. The templates happen to be contracts, so I must use the legal name.

        • #1042355

          The ampersand only shows up when the list is dropped down, so it’s not a workable solution anyway.
          You could create a userform with combo boxes to let the user select the appropriate names. The code behind the OK button sets the value of document properties or document variables, and these are referred to by DocProperty or DocVariable fields in the document.

          • #1042372

            I was hoping for something easy, but I guess this is another one of the Microsoft Word quirks.

            Is there a reason the Microsoft produces have issues with the ampersand?

            • #1042380

              In most controls, the ampersand is used to specify the so-called accelerator, i.e. the underlined letter that can be used as a shortcut. For example, the letter F in the File menu in almost all Windows applications is underlined, indicating that you can open the menu by pressing Alt+F. This is done by specifying &File as caption of the menu. The dropdown box uses this functionality too.

            • #1042387

              We have had issues with the ampersand in Sharepoint because the company name is used to name file folders.

              Thanks for the information.

              I think we’ll use Fill-In fields, Ref, and Bookmarks to get the company name in all the places in the templates.

            • #1042495

              I use this solution: put a dropdown containing “short” names in an blank line in the upper part of the document and make that hidden text. When the user Tabs out of the dropdown, an ExitMacro fires, which looks up the correct “long” name in an INI file and places that in a plain text FormField that is referenced to in other parts of the document.

    Viewing 0 reply threads
    Reply To: Dropdowns and Ref (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: