Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2022, 02:53 AM
parisfranco parisfranco is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2016
Novice
Hi, I wonder if I can make a dynamic document to speed up the creation of document
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default Hi, I wonder if I can make a dynamic document to speed up the creation of document

I have standarized report document besed on user data, DOB, name, last name etc.


Based of the users day of birth I create the report for him which is 80 pages long.

I have basically 9 different documents for each day of birth 1-9

So each birth day has different text but it takes me like 30 minutes to put everything together instead of few minutes dong it programatically by inserting required text based on user DOB name and Last name.

So how to make this dynamic document. There is no real tutorial on the web that I could find. I would like to speed up my work

Thank you
Reply With Quote
  #2  
Old 03-09-2022, 12:21 PM
kilroyscarnival kilroyscarnival is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2019
Expert
 
Join Date: May 2019
Posts: 345
kilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nice
Default

Quote:
Originally Posted by parisfranco View Post
I have standarized report document besed on user data, DOB, name, last name etc.
Based of the users day of birth I create the report for him which is 80 pages long.

I have basically 9 different documents for each day of birth 1-9

So each birth day has different text but it takes me like 30 minutes to put everything together instead of few minutes dong it programatically by inserting required text based on user DOB name and Last name.

So how to make this dynamic document. There is no real tutorial on the web that I could find. I would like to speed up my work

Thank you
I'm trying to picture what your document looks like. Do you mean you just need to personalize a standard document by inserting the person's name, date of birth, and so forth in specific places, or do you mean you would or wouldn't have whole sections based on a variable?

I'm not sure what you mean by each day of birth 1 through 9. One through 7 I would understand, meaning days of the week. One through 31, day within a month.

If you're only inserting a few variables into an otherwise standard report, then I suggest you consider using a mail merge. You would put your variables (the stuff that will be customized with each document) into a table in an Excel spreadsheet. Then you'd use Word's mail merge setup to insert fields into your existing document where those details will be inserted. There are some good Word mail merge tutorials on YouTube; most will be showing you how to merge for the purpose of multiple short items like form letters or invoices, but you can use the same technique for one.

Other methods could include using document fields within Word to help you insert the same information over and over (for example, if you wanted to repeat the subject's first name over and over again) but get a little clunky to insert a handful of different variables, then change them for the next use.

I mentioned some of this in this other answer on this forum, including some links to some videos and reference docs : https://www.msofficeforums.com/165252-post2.html

If you are really talking about inserting or not inserting whole sections into your document based on date of birth criteria, then you might want to look into keeping each section in a separate Word file and merge them. You could then write macros/VBA that would insert segments 1, 4, 7, 11. This shows a simple way of doing the combining: https://www.youtube.com/watch?v=zLNlRlvaU2w

I'm not sure whether you are talking about having one of nine different basic document types, or whether each document gets highly customized and personalized.

Best,

Ann
Reply With Quote
  #3  
Old 03-09-2022, 01:19 PM
parisfranco parisfranco is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2016
Novice
Hi, I wonder if I can make a dynamic document to speed up the creation of document
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default

Ok let me explain

It is an astrology report. And I have 9 different variations

DOB 1 are born on 1st, 10th 19th 28th of the month

so if I put in DOB 1 I have 20 pages of content that is always the same for DOB 1

For DOB 2 there is different text because they are born under new date and new text is for them

SO I am alwayx just copy and paste llarge chunks of text from saved templates into new document based on DOB...

I want to have several variables at the beggining of the doc then after I fill it for example DOB it will automatically prepare the whole document....
Reply With Quote
  #4  
Old 03-09-2022, 02:12 PM
Charles Kenyon Charles Kenyon is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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

Look into using AutoText.
Automated Boilerplate Using Microsoft Word

It can be triggered using AutoComplete, using an AutoTextList field, or otherwise inserted using the F3 key or even a macro.
It can be included in a Building Blocks Gallery Content Control.
Reply With Quote
  #5  
Old 03-09-2022, 11:40 PM
parisfranco parisfranco is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2016
Novice
Hi, I wonder if I can make a dynamic document to speed up the creation of document
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default

te second part of document has also 9 variations based on Date of birth

and then same text for several pages for all 9 variations

But here is the trick...I want to color different chunks of text based on their
sun sign for example

if he is aries the aries text would be colored in red
if he is aquarius aquarius text would be colored in red
etc

so I would like to have a form where I select his sign so it automatically gets colored

can this be done? I want to automate as much as possible...so coloring the text and rechecking manually takes a lot of time
Reply With Quote
  #6  
Old 03-10-2022, 07:03 AM
gmayor's Avatar
gmayor gmayor is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Based on the information provided, this is relatively simple to achieve using a macro to call a userform in which you can select the birth sign based on the birth date and write various values to the report as in the rudimentary example attached. See also Create a userform

Personally I would probably use content controls rather than docvariables to display the text again as in the attached, but either is possible.
Attached Files
File Type: docm Example.docm (35.4 KB, 6 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #7  
Old 03-10-2022, 07:07 AM
kilroyscarnival kilroyscarnival is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2019
Expert
 
Join Date: May 2019
Posts: 345
kilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nice
Default

Quote:
Originally Posted by parisfranco View Post
te second part of document has also 9 variations based on Date of birth

and then same text for several pages for all 9 variations

But here is the trick...I want to color different chunks of text based on their
sun sign for example

if he is aries the aries text would be colored in red
if he is aquarius aquarius text would be colored in red
etc

so I would like to have a form where I select his sign so it automatically gets colored

can this be done? I want to automate as much as possible...so coloring the text and rechecking manually takes a lot of time
Yeah, I really think learning macros/VBA will be the most helpful. You basically write a script that would apply various actions.

I think the first thing for you to do is make a kind of flow chart. Do you want to create nine different templates corresponding to your birth date factor, or twelve templates corresponding to each zodiac sign? Or one master template from which you then have to remove or modify all the parts that are not applicable? Break your document apart into segments. Maybe each document has a section 1 through 10, but if your subject is in Category 1 by birth date number, he gets Section 4 type A. If he's a Pisces, the tenth paragraph in Section 7 is red, but if he's Cancer, it's the 11th paragraph.

You could either write a script that would actively change the color of the text in one document, or it would grab the prepared highlighted Pisces version of that text and insert it. The latter is where the AutoText/Building Blocks feature that Mr. Kenyon has mentioned comes in. I guess you can save large chunks of text as building blocks; I tend to use it for mostly single paragraphs, or text boxes, or graphics. If you haven't used building blocks, there are some decent YouTube videos found by searching "Word Building Blocks", and this one is using Word 2016 specifically. https://www.youtube.com/watch?v=2__Oh8stI-o

Whichever method you determine best to put it all together, all of this will be helped by having a thorough knowledge of Styles in Word. If you already use Styles, so much the better. When my job changed and I started using Word much more for editing long, annotated documents, I ended up taking some of the Word courses on LinkedIn Learning (formerly Lynda.com), which are free with the first month's trial. It was a good refresher, and I learned a lot. The classes with Gini Von Courter were particularly good.

Best,

Ann
Reply With Quote
  #8  
Old 03-10-2022, 09:41 AM
parisfranco parisfranco is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2016
Novice
Hi, I wonder if I can make a dynamic document to speed up the creation of document
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default

>Hmmm i get it....
I think putting all the text in the document to have 1 huge file and then based on dob and zodiac it would delete the obsolete...
how hard is it to learn macros?
Autotext does not delete text? Just adds it?
Reply With Quote
  #9  
Old 03-10-2022, 12:43 PM
Charles Kenyon Charles Kenyon is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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
>Hmmm i get it....
I think putting all the text in the document to have 1 huge file and then based on dob and zodiac it would delete the obsolete...
how hard is it to learn macros?
Autotext does not delete text? Just adds it?
Learning to program in vba is like learning anything. You start. You learn. You make mistakes. You learn from the mistakes. See Word Macros and Visual Basic for Applications (VBA) FAQ. The more programming experience you have using other languages the easier it is, I would guess. It is not overnight, but you can start using and writing macros that help you very quickly. UserForms are a layer above vba. You do not need to know everything about vba to use them, but some basic knowledge is almost required.
AutoText does not delete, no, but you can use a Building Blocks Content Control or an AutoTextList Field to simply select what you want. The AutoText/Building Block is stored in template. That template can be your document template or it can be a global template.
I believe that using AutoText/Building Blocks is likely easier than jumping into using a UserForm but it does require a basic understanding of templates and building blocks so that it stays available to you.
Reply With Quote
  #10  
Old 03-10-2022, 01:03 PM
parisfranco parisfranco is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2016
Novice
Hi, I wonder if I can make a dynamic document to speed up the creation of document
 
Join Date: Jul 2017
Posts: 10
parisfranco is on a distinguished road
Default

the last thing I want is to automate my excel forms...
I put in some dates based on DOB and present date to calculate one number in excel that is embedded in word...can this be automated too?
Reply With Quote
  #11  
Old 03-10-2022, 01:20 PM
Charles Kenyon Charles Kenyon is offline Hi, I wonder if I can make a dynamic document to speed up the creation of document Windows 10 Hi, I wonder if I can make a dynamic document to speed up the creation of document Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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
the last thing I want is to automate my excel forms...
I put in some dates based on DOB and present date to calculate one number in excel that is embedded in word...can this be automated too?
Brief answer: Yes.

Please ask one question per thread. While this is the same project for you, we want to make this forum helpful not just to you but to those who may be searching the web. Multiple questions per thread defeats this. Bringing in information from Excel is a different topic. How to post a question on this MSOffice forum
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
speed up macro to Highlight Phrases in document based on list input from text file Gontch Word VBA 2 01-21-2021 11:08 AM
How to record document creation? Evil Overlord Word VBA 2 12-02-2018 04:55 PM
Document creation with pre-defined text scar1 Word 5 03-08-2017 12:08 PM
Hi, I wonder if I can make a dynamic document to speed up the creation of document Document Creation Caerleon Word 1 09-11-2015 07:42 PM
Hi, I wonder if I can make a dynamic document to speed up the creation of document Document Creation Privateer Word 3 06-20-2013 08:15 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:42 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