Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2017, 08:30 PM
dushan997 dushan997 is offline Choosing Mail Merge templates and excel Data Sources using drop downs Windows 7 64bit Choosing Mail Merge templates and excel Data Sources using drop downs Office 2013
Novice
Choosing Mail Merge templates and excel Data Sources using drop downs
 
Join Date: Aug 2017
Posts: 2
dushan997 is on a distinguished road
Default Choosing Mail Merge templates and excel Data Sources using drop downs


I want to generate documents using a selection of Mail Merge Word templates and a selection of Excel data sources. So ideally there will be a custom drop down the user can use to select the desired template and another custom drop down where the user can select the desired data source and generate the documents. It is the user's responsibility to have the template configured in advance with the correct fields as per the selected data source.

So in summary, what I want to do is to add custom buttons, drop downs to Microsoft word (Or a custom form that can be loaded using a button on the ribbon bar) that will enable the user to load up templates to a drop down from a given directory using a file open dialog box, and to load up data sources to another drop down using a file open dialog box and then a generate button to generate documents according to the selected data source and the template.

I'm a developer but new to VBA. Appreciate if someone can point me in the right direction with some sample code or a better way of doing this. The solution has to be simple enough for a non IT person to generate documents using different templates and data sources selected using a drop downs.

Thanks in advance,
Kind Regards,
Dushan

Last edited by dushan997; 08-03-2017 at 08:33 PM. Reason: for elaborating better, defined what type of data sources
Reply With Quote
  #2  
Old 08-03-2017, 11:15 PM
macropod's Avatar
macropod macropod is offline Choosing Mail Merge templates and excel Data Sources using drop downs Windows 7 64bit Choosing Mail Merge templates and excel Data Sources using drop downs Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by dushan997 View Post
It is the user's responsibility to have the template configured in advance with the correct fields as per the selected data source.
That makes having a macro rather pointless, since the user has to open & configure the mailmerge main document before they can use it (including adding any mergefields, filters, etc. - which requires connecting to the data source) and, once they've done that, they may as well complete the merge then & there.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-04-2017, 03:38 AM
dushan997 dushan997 is offline Choosing Mail Merge templates and excel Data Sources using drop downs Windows 7 64bit Choosing Mail Merge templates and excel Data Sources using drop downs Office 2013
Novice
Choosing Mail Merge templates and excel Data Sources using drop downs
 
Join Date: Aug 2017
Posts: 2
dushan997 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
That makes having a macro rather pointless, since the user has to open & configure the mailmerge main document before they can use it (including adding any mergefields, filters, etc. - which requires connecting to the data source) and, once they've done that, they may as well complete the merge then & there.
Thank you so much for your valuable time taken for this.

Actually the templates are not varying over time. They have only 3 fixed templates. Think of these as standard certificates for a school. And the data source is the same for all three, although I made it slightly flexible by loading data sources to a different drop down.

Only that they need to choose one out of three templates each time. So initially the admin can do a manual mail merge to generate these three templates and save them in a directory so that the user does not have to go though the process again.

It is for saving time and to reduce complexity for non IT users.

Last edited by dushan997; 08-04-2017 at 03:39 AM. Reason: Thanking the user
Reply With Quote
  #4  
Old 08-04-2017, 07:54 PM
macropod's Avatar
macropod macropod is offline Choosing Mail Merge templates and excel Data Sources using drop downs Windows 7 64bit Choosing Mail Merge templates and excel Data Sources using drop downs Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Surely, all the users need do, then, is pin the three mailmerge main documents to Word's recent file list???
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
mailmerge, vba, word development

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Choosing Mail Merge templates and excel Data Sources using drop downs Convert Drop downs to text and copying to Excel? reidthaler Word 2 09-02-2016 06:34 AM
Drop Downs Suray1911 Excel 1 09-29-2015 10:31 PM
how NOT to start word 2013 with 'choosing templates'? dylansmith Word 4 12-08-2012 12:59 PM
Choosing Mail Merge templates and excel Data Sources using drop downs Templates, pictures, Mail Merge and Excel kckay Word VBA 1 05-17-2012 08:51 PM
Choosing Mail Merge templates and excel Data Sources using drop downs Please help me with drop downs in Excel 2010 mhays Excel 6 01-16-2012 09:29 AM

Other Forums: Access Forums

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