1. OCAU Merchandise is available! Check out our 20th Anniversary Mugs, Classic Logo Shirts and much more! Discussion in this thread.
    Dismiss Notice

VBA code in word for a multi select list

Discussion in 'Programming & Software Development' started by smack01, May 13, 2019.

  1. smack01

    smack01 Member

    Joined:
    Aug 19, 2002
    Messages:
    3,582
    Location:
    Brisbane
    Morning. Hoping someone will be able to assist with the following.

    I am working on a word document where I want to:

    1) Insert a button that bring ups a multi-select list
    2) The multi-select list allows me to select a number of default statements
    3) Insert a button at the bottom of the list that when clicked will populate the selected statements to certain lines in the word document.

    Is this even possible?

    I can create a button that shows the list (MultList1.show). I can can create the list with the default statements and allow multi-select (with LIstBox1 .AddItem). But I can not program a button that will then take those selections and copy them into the word document on a certain line.

    FYI - This isn't homework LOL. This is me trying to over complicate a form at work which is distributed to multiple departments who when asked to populate the statements that are applicable to their department always change the wording of the statements which need to be consistent.
     
    Last edited: May 13, 2019
  2. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,478
    Location:
    BRISBANE
    Where do the line number/s come from?
     
  3. OP
    OP
    smack01

    smack01 Member

    Joined:
    Aug 19, 2002
    Messages:
    3,582
    Location:
    Brisbane
    That I have no idea on. Does each line in a word document have it's own position? Would I need to create a table where I want the statements to go and tell it to populate a certain cell?

    All the online research I have seen always relates to excel spreadsheets where you can easily assign a cell for something to populate to.
     
  4. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,478
    Location:
    BRISBANE
    Are the insertion positions always the same?
     
  5. OP
    OP
    smack01

    smack01 Member

    Joined:
    Aug 19, 2002
    Messages:
    3,582
    Location:
    Brisbane
    They would always start on the same line and then depending on how many statements are selected they will then insert a new selection per line.
     

Share This Page

Advertisement: