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

%3CLINGO-SUB%20id%3D%22lingo-sub-3216184%22%20slang%3D%22en-US%22%3Einserting%20a%20selected%20paragraph%20from%20a%20database%20of%20many%20paragraphs%20in%20word%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3216184%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20a%20noob%20developer%2C%20though%20I%20did%20manage%20to%20add%20drop%20downs%20and%20date%20selectors%20to%20a%20Word%20doc.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20hints%20on%20methods%20for%20adding%20whole%20paragraph%20to%20a%20table%20cell%20depending%20on%20an%20input%20code%20(or%20some%20other%20method).%3C%2FP%3E%3CP%3EI%20was%20able%20to%20make%20a%20drop%20down%20list%20with%20whole%20paragraphs%20as%20the%20display%20name%2C%20but%20it%20seems%20a%20clunky%20solution%2C%20especially%20if%20my%20colleague%20wants%20to%20select%201%20of%2042%20different%20paragraphs.%20I%20want%20her%20to%20be%20able%20to%20type%20an%20input%20code%20either%20in%20the%20cell%20or%20somewhere%20else%20in%20the%20document%20and%20have%20the%20paragraph%20returned%20to%20the%20cell.%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3217406%22%20slang%3D%22en-US%22%3ERe%3A%20inserting%20a%20selected%20paragraph%20from%20a%20database%20of%20many%20paragraphs%20in%20word%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3217406%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1318467%22%20target%3D%22_blank%22%3E%40JonBastians%3C%2FA%3E%26nbsp%3BTake%20a%20look%20at%20the%20video%20that%20I%20have%20uploaded%20that%20was%20made%20during%20the%20process%20of%20creating%20a%20Building%20Block%20for%20each%20of%20the%20paragraphs%20from%20which%20the%20selection%20is%20to%20be%20made%2C%20and%20then%20at%20the%20location%20where%20you%20want%20the%20selected%20paragraph%20to%20be%20installed%2C%20insert%20a%20Building%20Block%20Gallery%20Content%20Control%20from%20which%20the%20user%20can%20select%20the%20building%20block%20that%20contains%20the%20paragraph%20that%20is%20to%20be%20installed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3219095%22%20slang%3D%22en-US%22%3ERe%3A%20inserting%20a%20selected%20paragraph%20from%20a%20database%20of%20many%20paragraphs%20in%20word%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3219095%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20so%20much%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1225189%22%20target%3D%22_blank%22%3E%40Doug_Robbins_Word_MVP%3C%2FA%3E%26nbsp%3B!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20taking%20the%20time%20to%20make%20this%20video.%20I%20was%20able%20to%20follow%20it%20and%20the%20solution%20worked%20for%20me.%20I%20know%20you%20mentioned%20that%20the%20format%20should%20be%20.dotx%20which%20is%20what%20I%20followed%20when%20loading%20the%20building%20blocks.%20When%20I%20%22save%20as%22%20the%20default%20is%20.docx%20and%20the%20resulting%20file%20seems%20to%20also%20work.%26nbsp%3B%20I%20want%20to%20make%20using%20the%20document%20as%20easy%20as%20possible%20for%20my%20colleagues%20so%20in%20your%20opinion%2C%20do%20I%20need%20to%20specify%20.dotx%20for%20all%20the%20subsequent%20files%20or%20will%20.docx%20be%20ok%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20for%20the%20help%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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.

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.
Ah Doug_Robbins_Word_MVP that makes total sense :)

Would you like to have a crack at my next query?

I have searched the forum for this solution and no luck yet. Should i post it as a separate query?

Anyway, here goes: I have found the way to "find and replace" a word in a .docx which would be a useful manual process for adding a person's name in the text. However, I would like to investigate if I can have a cell for the user to enter a name and have that name automatically replace many words in the body of the document?
See the following pages of Greg Maxey's website:
https://gregmaxey.com/word_tip_pages/repeating_data.html
and
https://gregmaxey.com/word_tip_pages/content_controls.html
including pages for which there are links on the above pages.
Post back here if you get stuck.

Thanks again @Doug_Robbins_Word_MVP !

 

I do appreciate your time on this. I haven't tried the solutions yet but I certainly will and let you know how I get on.  Cheers!