Consulting

Results 1 to 3 of 3

Thread: Word - List of files in listbox + insert selected

  1. #1
    VBAX Newbie
    Joined
    Mar 2018
    Posts
    4
    Location

    Word - List of files in listbox + insert selected

    Hello everyone,

    I am new to vba and I am looking for a macro that:
    1 / list in a listbox the name of the word files (without extension) present in a directory
    2 / a button to insert, in the active document, the contents of one of the files selected in the drop-down list

    thank you in advance for your lighting

  2. #2
    The attached zip contains a simple template - open it up and the userform will show.
    It has a button on the QAT that will call the form should you use it as an add-in.
    I don't like the idea of using it to show all Word compatible documents, as this can create problems when you insert them, so thew form only shows docx format documents.
    Take a look at http://www.gmayor.com/Userform.htm which shows how to insert userform data other than at the cursor.
    See also https://www.gmayor.com/select_document_template.htm
    Attached Files Attached Files
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  3. #3
    VBAX Newbie
    Joined
    Mar 2018
    Posts
    4
    Location
    Thank you very much GMayor, I try it and I come back to you.
    Have a nice day

Tags for this Thread

Posting Permissions

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