Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2018, 09:14 AM
shallaes shallaes is offline Generate template-based letter with multiple variables Windows 10 Generate template-based letter with multiple variables Office 2013
Novice
Generate template-based letter with multiple variables
 
Join Date: Jul 2018
Posts: 3
shallaes is on a distinguished road
Default Generate template-based letter with multiple variables


I am fairly new to VBA but generally pick up things fast, with the help of handy google searching. For what I need I'm not getting any spot on hits, and my somewhat limited VBA experience is 100 % from excel.


I'm looking for a way to make a template of a standard issue letter which typically have 7-10 different variables. The people who are going to use this are not that adept at computers in general and need things to be super easy to handle. So I reckon the closest I could get is a form that opens when you open the template, with a window of input for all your different variables. Click. Letter done. Everybody's happy.


I realise I might be getting in over my head, but what I'm wondering is... where do I start? Am I even in the right place?
Reply With Quote
  #2  
Old 07-09-2018, 02:14 PM
slaycock slaycock is offline Generate template-based letter with multiple variables Windows 7 64bit Generate template-based letter with multiple variables Office 2016
Expert
 
Join Date: Sep 2013
Posts: 256
slaycock is on a distinguished road
Default

Where do the values for the variables come from. Are they sets of well defined text. Are there any dependencies?
Reply With Quote
  #3  
Old 07-09-2018, 03:43 PM
Guessed's Avatar
Guessed Guessed is offline Generate template-based letter with multiple variables Windows 10 Generate template-based letter with multiple variables Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Are the users in-house? Macros are a great solution when the template can be distributed easily to them - not so great when the template is emailed or downloaded because the macro security can be a complicating factor.

I would explore a non-macro solution first by using linked Content Controls and put a 1 page form in front of the letter as the 'input form'. The input form can be completed, and then the user can delete that page.

To help setup the linked CCs in the file, you should use an addin template like Greg Maxey's Content Control Tools https://gregmaxey.com/word_tip_pages...rol_tools.html
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #4  
Old 07-10-2018, 12:57 AM
shallaes shallaes is offline Generate template-based letter with multiple variables Windows 10 Generate template-based letter with multiple variables Office 2013
Novice
Generate template-based letter with multiple variables
 
Join Date: Jul 2018
Posts: 3
shallaes is on a distinguished road
Default

Thanks for your replies.


Okay, so it's an audit report for small companies with nearly all generic text.


Some variables necessarily needs to be put in directly (company name, financial results - company specific variables that cannot be imported from anywhere).


Others will have 2-5 predefined options (organ addressed, choosing type of organization leading to words being replaced throughout the report, minor deviations in text or rearrangement of 3-4 words based on content of annual report)


Should I still go non-macro? And how hard and/or time-consuming would it be to put together what I'm looking for?
Reply With Quote
  #5  
Old 07-10-2018, 01:42 AM
gmayor's Avatar
gmayor gmayor is offline Generate template-based letter with multiple variables Windows 10 Generate template-based letter with multiple variables Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
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

I think you are missing Andrew's point about who is completing the document. If you are sending out the from for others to complete it is better to try and avoid macros. Content controls are better for that as you cannot force users to run macros. To that end https://www.gmayor.com/insert_content_control_addin.htm makes the insertion of content controls, and mapped content controls a simple task.

If you are filling in the form yourself (or someone in your company is tasked with that) then macros can more readily be used and to that end you might consider a userform to collect the data which can be written to bookmarks, variables or again and perhaps best of all content controls.

Greg's site, referred to by Andrew, has a lot of information on Content Controls and how to manipulate them. Greg has been a good friend for more years than I care to think about, and he will not mind me saying that his add-ins tend to be for the power user, who understands what it is they do. He cannot resist the intellectual challenge of stretching what they are capable of. Mine are aimed more at the lay end user where such understanding is less necessary nor desirable.
__________________
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
  #6  
Old 07-12-2018, 12:18 AM
shallaes shallaes is offline Generate template-based letter with multiple variables Windows 10 Generate template-based letter with multiple variables Office 2013
Novice
Generate template-based letter with multiple variables
 
Join Date: Jul 2018
Posts: 3
shallaes is on a distinguished road
Default

Thank you for the explanation, Graham. Content Controls it is then.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
template text selection based on input multiple choice question waba Word VBA 1 04-08-2018 02:31 PM
Generate template-based letter with multiple variables Need a formula to set a field based on two variables unknownhere2000 Excel 2 01-12-2016 01:05 PM
Generate template-based letter with multiple variables Need help with a template based letter xJennyx Word VBA 2 07-25-2014 09:00 AM
Generate individual checklists from one template pog451 Excel 0 02-04-2014 05:26 AM
Calculating a cell value based on many variables malawimick Excel 0 12-14-2011 05:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:54 AM.


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