Forum Discussion

JonBastians's avatar
JonBastians
Copper Contributor
Feb 26, 2022

inserting a selected paragraph from a database of many paragraphs in word

Hi All, 

I'm a noob developer, though I did manage to add drop downs and date selectors to a Word doc. 

I would like hints on methods for adding whole paragraph to a table cell depending on an input code (or some other method).

I was able to make a drop down list with whole paragraphs as the display name, but it seems a clunky solution, especially if my colleague wants to select 1 of 42 different paragraphs. I want her to be able to type an input code either in the cell or somewhere else in the document and have the paragraph returned to the cell.    

6 Replies

  • JonBastians Take a look at the video that I have uploaded that was made during the process of creating a Building Block for each of the paragraphs from which the selection is to be made, and then at the location where you want the selected paragraph to be installed, insert a Building Block Gallery Content Control from which the user can select the building block that contains the paragraph that is to be installed.

     

    A few points to note:

    1. Create a new category to contain the building blocks (ABA was used in the video) and then select that category in the Properties dialog of the Building Block Gallery Content Control so that it will only display the building blocks from that category.
    2. Save the document as a template and save each of the building blocks into that template.  In the video, the template that was used was "Publication Agreement Revised.dotx Save the document in that format before creating the building blocks and temporarily paste each of the paragraphs into that template so that it can be selected for the purpose of creating the building block.  After doing that, delete the paragraph(s) from the document.  The paragraphs do not have to be in the cell into which the paragraphs are required when creating the building blocks.
    3. When the user wants to create a document, the should based that document on the template.

    Post back here if you have any questions.

    • JonBastians's avatar
      JonBastians
      Copper Contributor

      Thanks so much Doug_Robbins_Word_MVP !!

       

      Thanks for taking the time to make this video. I was able to follow it and the solution worked for me. I know you mentioned that the format should be .dotx which is what I followed when loading the building blocks. When I "save as" the default is .docx and the resulting file seems to also work.  I want to make using the document as easy as possible for my colleagues so in your opinion, do I need to specify .dotx for all the subsequent files or will .docx be ok?

       

      Thanks again for the help 🙂

      • While a docx document will work, when an employee opens that document and edits it, and saves it, they will overwrite the original file.
        On the other hand if the form is set up as a template (.dotx) the default action for using such a file is for a new document to be created from it and saving that document will NOT overwrite the template.

Resources