Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2017, 06:40 AM
parisfranco parisfranco is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2016
Novice
Need to create document that will auto insert text based on parameters
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default Need to create document that will auto insert text based on parameters

This is difficult. I do regular lawyer stuff and I just want to automate things.

My document is usually 50 pages long. It consisits of pages of content.

But the content depends on that person date of birth.

If he is born in January, then I have to manually insert few paragraphs for month januarry....if he is born on febriary, then I have to insert few other paragraphs of text....

It is time consuming to copy and paste all the time based on the DOB parameter....

Could I just make it automatic, so at the start of document I would have a form that would ask me for name, last name of the client and DOB.....so if I select january word would automatically populate document with january custom content....



There are 12 variations of text, for each month of the person

I hope this can be solved somehow

Last edited by Charles Kenyon; 07-25-2017 at 12:29 PM. Reason: Modify title to clarify problem
Reply With Quote
  #2  
Old 07-25-2017, 08:07 AM
silentwolf silentwolf is offline Need to create document that will auto insert text based on parameters Windows 7 64bit Need to create document that will auto insert text based on parameters Office 2010 64bit
Novice
 
Join Date: Dec 2016
Location: Austria
Posts: 16
silentwolf is on a distinguished road
Default

Hi,
Not sure if those kind of things can be done in regular word but in VBA I would think this should be achievable.
So laws change depanding on what month someone is born
can you give us an example of what text or paragaphs have to be entered?

Depanding on the length of those textes or paragraphs but maybe you could you use bookmarks?


SW
Reply With Quote
  #3  
Old 07-25-2017, 08:10 AM
parisfranco parisfranco is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2016
Novice
Need to create document that will auto insert text based on parameters
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default

January person : use text A


AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAA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CCCCCC




I hope you understand
Reply With Quote
  #4  
Old 07-25-2017, 08:12 AM
parisfranco parisfranco is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2016
Novice
Need to create document that will auto insert text based on parameters
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default

the idea is that for example 12 paragraphs are stored in WORD backend somewhere, if that is possible and then just inserted based on choosing the month of the person

but month of the person is just example

I have like 7 different parameters

name, last name, DOB............etc....
Reply With Quote
  #5  
Old 07-25-2017, 09:25 AM
Charles Kenyon Charles Kenyon is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

It can be solved so long as your date is simple. That is, if you have three fields, one for month, one for day, and one for year, it should not be difficult. If you have a date field, though, it gets tougher.

The basic field is an IF field. You have to identify your month field in some way. I would suggest using either Mapped Content Controls or legacy form fields for your drop-down. Content Controls and legacy fields should not be used in the same document, you should choose one or the other.

The advantage of the legacy controls is that you can check the "calculate on exit" box in properties and any IF fields based on that control will update automatically when the user tabs out of the control. A second advantage is that it is easy to give a legacy control a bookmark name. A disadvantage is that the document must be protected for "filling in forms" which disables ability to use many other Word features. Another disadvantage is that these are "legacy" controls and at some point Word may stop using them.

The advantage of content controls is that it can be "mapped" so that you do not need bookmarks to reference it. Another advantage is that such controls are likely to be supported in Word longer than the legacy controls. The document does not have to be severely restricted as far as editing goes.
Reply With Quote
  #6  
Old 07-25-2017, 09:42 AM
Charles Kenyon Charles Kenyon is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

The parts to be inserted can be inserted using an AutoText field and stored as AutoText entries in either your document template or a global template.
Automated Boilerplate Using Microsoft Word
Reply With Quote
  #7  
Old 07-25-2017, 09:43 AM
parisfranco parisfranco is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2016
Novice
Need to create document that will auto insert text based on parameters
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
It can be solved so long as your date is simple. That is, if you have three fields, one for month, one for day, and one for year, it should not be difficult. If you have a date field, though, it gets tougher.

The basic field is an IF field. You have to identify your month field in some way. I would suggest using either Mapped Content Controls or legacy form fields for your drop-down. Content Controls and legacy fields should not be used in the same document, you should choose one or the other.

The advantage of the legacy controls is that you can check the "calculate on exit" box in properties and any IF fields based on that control will update automatically when the user tabs out of the control. The disadvantage is that the document must be protected for "filling in forms" which disables ability to use many other Word features.

(to be continued)
Yes I will have field for each parameter, one for day, one for month and one for year
So it will be
IF the mnoth is 1(january) then paste this content here at this bookmark

Yes I just want to use form to input data......
lets say 7fields and I will just input it and word will calculate everything and create document.....

But I want to definately hide the form field from end user....is that possible
he must not know content was generate like that

What do you mean by locking the word doc?
I need to edit it, but the end user not, because I will save it as PDF anyways, so he will be able to read it only
Reply With Quote
  #8  
Old 07-25-2017, 09:46 AM
parisfranco parisfranco is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2016
Novice
Need to create document that will auto insert text based on parameters
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
The parts to be inserted can be inserted using an AutoText field and stored as AutoText entries in either your document template or a global template.
Automated Boilerplate Using Microsoft Word
yes exactly I want to create one big template for all documents.....
maybe can word just create another document from this template....so it will be not the same doc and not have any forms etc...that would be the best....

is that link you gave me easy to understand?
I want to paste also like content that is 3 pages long.....is that ok or too much data?

imagine guys I am creating personal report for somebody and I want to just let the word do all the pasting of the pre prepared text....based on parameters like age, day of birth, month, name etc......
Reply With Quote
  #9  
Old 07-25-2017, 12:36 PM
Charles Kenyon Charles Kenyon is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by parisfranco View Post
yes exactly I want to create one big template for all documents.....
maybe can word just create another document from this template....so it will be not the same doc and not have any forms etc...that would be the best....

is that link you gave me easy to understand?
I want to paste also like content that is 3 pages long.....is that ok or too much data?

imagine guys I am creating personal report for somebody and I want to just let the word do all the pasting of the pre prepared text....based on parameters like age, day of birth, month, name etc......
I am also a lawyer and the author of the link. I would say it is intermediate. You are a better judge than am I as to how h

You could include a lot of stuff in a single AutoText entry. Editing an AutoText entry, though, requires inserting it in a document, making changes, and then resaving it with the same name.

My laptop is acting up on this site and may need a reboot.
Here is a template that shows a bit how this works.
Using repeating data in IF Fields Sample template with AutoText.dotx

That looks at some different methods. You have at least three parts to your problem:
  1. Repeating Data - you need to test for the results of input in one location elsewhere
  2. AutoText - to be stored in a template Templates in Microsoft Word
  3. IF Fields - very powerful but not necessarily easy
  4. Updating fields - depends on how you are doing it.
Download the template (link above) and take a look at it.


Here is the bible on field calculations:
https://www.msofficeforums.com/word/...-tutorial.html

Using a template, you create a new document in each instance of use. That document does not contain the AutoText but has access to it.


When you convert that document to pdf, the link is lost and the AutoText is put in as text/images.


The thing about fields that test data is they are not automatically refreshed. The only exception is in a document protected for filling in forms. I don't think you want that. So, no legacy fields and you will have to refresh the rest.


That can usually be done with Ctrl+A (Select All) followed by F9 (update field). You can get fancier than that, but we are already very complicated for a beginner.
Reply With Quote
  #10  
Old 07-25-2017, 12:58 PM
Charles Kenyon Charles Kenyon is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Take a look at Repeating Data Using Document Property Content Controls and Other Mapped Content Controls.

That is about putting something in one place and having changes to it show up everywhere it is used. If the Document Property Content Controls are used it is very easy. If you need more, there is a link to information on Mapped Content Controls.

The sample I posted has examples of both a Document Property Content Control (the date picker sample) and a mapped content control.
Reply With Quote
  #11  
Old 07-25-2017, 01:01 PM
Charles Kenyon Charles Kenyon is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

If you are doing this for your own use, you owe it to yourself to devote some time learning more about Word first. Otherwise you'll end up with a bunch of stuff that will drive you crazy. Start with Styles and Templates. If you do not have a handle on those, you will be exponentially increasing your headaches.

I guarantee that every hour you spend learning this stuff (at least up to the first 40) will be repaid fivefold within the next couple of months.
Reply With Quote
  #12  
Old 07-25-2017, 01:07 PM
Charles Kenyon Charles Kenyon is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

The date picker content control in the sample took some work but it turns out that you can simply select the date of birth and have it show the month or day or year when testing for putting in other text.

To look at fields in the template you will need to press Alt+F9. That toggles display of field codes. Don't forget to toggle back, though!
Reply With Quote
  #13  
Old 07-25-2017, 01:10 PM
Charles Kenyon Charles Kenyon is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I am a criminal defense lawyer. I have a lot of forms and boilerplate pleadings I need to use as rough drafts. So I have basic information about a case that needs to go into a number of different documents at different times. For that, I use Mail Merge. It gives me the rough draft of my document with the client and case information filled in. I make some changes and file with the court or send to opposing counsel. That is a different method than what you are looking at.
Reply With Quote
  #14  
Old 07-25-2017, 03:21 PM
Charles Kenyon Charles Kenyon is offline Need to create document that will auto insert text based on parameters Windows 10 Need to create document that will auto insert text based on parameters Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,116
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Please post back after you've looked at the template and given some thought about your project. Remember, it does not have to be perfect, just good. You can refine later.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy text to new document based on paragraph numbering mike.mm Word VBA 7 11-22-2016 06:14 AM
Need to create document that will auto insert text based on parameters How to insert hyperlink based on text PRA007 Word VBA 2 11-05-2015 05:30 AM
How to insert hyperlink based on the text PRA007 Word VBA 3 05-11-2015 01:11 AM
Need to create document that will auto insert text based on parameters Auto populate & auto calculate values from other sections in the same word document Frantic Word VBA 2 01-24-2015 04:54 PM
Need to create document that will auto insert text based on parameters Insert image based on document custom property anandyrh Word 1 08-14-2013 12:08 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft