|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Making a user form that creates docs by combining text blocks in preset combos
Hello all,
I am trying to create a system through which sections of text (building blocks?) can be combined in different pre-set ways to make new documents. To give some context, I am working with a contract that has many different versions depending on what product the client is signing up for. Because there are so many versions, editing a part of the contract is a tedious and error-prone process in that all the different versions must be manually edited to reflect the change. My idea is that if I could create a master list of contract "blocks" (some of which are re-used in every contract and some of which are version specific) then all I would need to do is edit a blocks once, and then any contract that is created by combining the different blocks would reflect the changes. Ideally there would be some sort of user forum that would ask what version of the contract you want, and then the code would combine the blocks and spit out a document. Any ideas or guidance would be greatly appreciated. Thanks for your time in advance! |
#2
|
||||
|
||||
Initial tests suggest the following will work.
If you insert all the blocks into the text space of your template. You can insert a mapped plain text content control (or controls) in the part of the document that will always appear, then copy and paste the content control(s) wherever else its content should appear in the various sections. https://www.gmayor.com/insert_content_control_addin.htm will make the mapped content control insertion a breeze. Save the sections as autotext entries in your template. Delete all but the fixed text with the initial control(s). You can then create a new document from the template and pick the sections you require from your userform and insert them in the document as required. When all have been inserted, whatever you put in any of the controls will be echoed in the others.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Thank you for the response!
If I understand your suggestion correctly I think this may be a solution to a problem other than mine. Based on my understanding mapped content controls are used to populate different parts of a document with the same content. The issue I have is not that changes to a portion of the contract must be made to multiple sections, but rather that we have multiple contracts (separate docs) that all have similar parts like the intro or terms of warranty. As a result any changes to these must be done in each document which can be hard to keep track of. I'm trying to find a way to build the contracts using the blocks such that the intro or warranty section would only have to be edited once, and then the edited block would be pulled (along with all the contract specific blocks) to make the final document. If this was your understanding I apologize, maybe I need to brush up on the techs behind your suggestion. |
#4
|
||||
|
||||
You are right about the mapped controls. It was your use of the term 'similar' that led to the suggestion. If you meant 'same' then the basic principle still holds good. you can insert autotext building blocks of the fixed texts, without the mapped controls, in the same way.
Or you could perhaps save the texts as separate documents and insert them - see http://www.gmayor.com/Boiler.htm which demonstrates a way of doing that.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Combining 2 objects into one image & making the gaps between them transparent? | wcngu1 | Visio | 0 | 11-29-2016 08:21 PM |
A form for my own use which creates a document? | CactusWren | Word | 5 | 08-31-2015 11:22 AM |
Help on combining 4 word docs in 1 | SamUS | Word | 4 | 12-19-2014 06:25 PM |
Retrieving Rich Text from a RTF Text box in a User Form | jpb103 | Word VBA | 14 | 06-23-2014 08:45 AM |
Auto Uppercase in preset form | MechEng | Word | 1 | 07-20-2012 10:29 AM |