Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    Aug 2003
    Location
    amsterdam, Netherlands
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    multiple lines in pull down field (word 2002)

    Hi everyone,

    I have a template for creating reportdocuments. It is setup as a big word form
    with a couple sections of which the first two are protected.
    In the protected part the user can fill in a couple fields.

    What I need to make is a way for user to select the company address of his/her location.
    Including name address zipcode city phone etc.
    We have 5 locations and I want to make a combo box where user can select one of our 5 locations that will then place all the related address info. (They are fixed addresses so I can program it in the macro). This field is placed in a frame.

    It Sounds simple but I ran into a couple different problems.
    First: the simple combo box feature that comes with word forms can only have one line,
    and I could not find a way to add a set of 6 lines per item.

    Q1. Is there still a way to do this. That would be the easiest.

    Then I

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

    Re: multiple lines in pull down field (word 2002)

    A1. By definition, each "line" in a combo box or list box is a different item. The concept of having multiple lines per item is contradictory to the nature of a combo box/list box.

    A2. You can set the "value" of a text form field in a protected document as follows:

    ActiveDocument.FormFields("Text37").Result = "My Company" & vbCr & "PO Box 12345"

    As you see, you can use the carriage return character vbCr to set a multiline value.

    A3. I don't understand this question. You can create a dropdown list on a toolbar in code: CommandBars("MyToolbar").Controls.Add(msoControlDr opdown). See <post#=328351>post 328351</post#> for an example.

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: multiple lines in pull down field (word 2002)

    I would suggest using autotextlists to bring in your addresses. This article by Bill Coan will give you all the information you need to understand how it works. How to add pop-up lists to any Word document, so you can click your way through changes in seconds

    This solution may be sufficiently different from the way you have set up your form fields and protected sections that it may not work for you but it is worth looking at to consider.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

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

    Re: multiple lines in pull down field (word 2002)

    You can let users choose a location in a dropdown field end fill other formfields depending on that choice. See attachment.
    Attached Files Attached Files

  5. #5
    Lounger
    Join Date
    Aug 2003
    Location
    amsterdam, Netherlands
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: multiple lines in pull down field (word 2002)

    Yep.
    very cool feature, just tried it.
    and I love it.
    but to bad it doesn't work in a protected document.

    greetings
    Diederik

  6. #6
    Lounger
    Join Date
    Aug 2003
    Location
    amsterdam, Netherlands
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: multiple lines in pull down field (word 2002)

    Hi hans,

    Thanks for your reply
    Trying that maco line is for tommorow but it seems simple.

    about the pulldown menu (A3): I tried the code in that link you sent me last week.
    the problem I had then was that I don't fully understand ervery part of it and something goes wrong. It couldnty get it to work.
    and then it gets to complex for me without having to bother you guys for every part of the code to figure it out, so I just left it.

    Thanks again for your help.

    Diederik

  7. #7
    Lounger
    Join Date
    Aug 2003
    Location
    amsterdam, Netherlands
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: multiple lines in pull down field (word 2002)

    Hi Jan.

    That is exactly what I was looking for.
    thank you very much.

    Great,
    Diederik

Posting Permissions

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