Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2018, 12:05 PM
MP1989 MP1989 is offline Mail merge all fields into 1 document with rules Windows 10 Mail merge all fields into 1 document with rules Office 2010 64bit
Novice
Mail merge all fields into 1 document with rules
 
Join Date: Jun 2018
Posts: 9
MP1989 is on a distinguished road
Default Mail merge all fields into 1 document with rules


Hi all,

Not sure if this can be done hence why I'm asking.

I'm looking to create a mail merge document in word using data from an excel file. I currently have a template document that I copy and paste the data into from the spread sheet (high tech I know). I'm looking for this to be done automatically and thought mail merge was an option as have done this before, but it might not be so open to suggestions.

The first issue is I want the next row of data to be entered into the next row of a table rather than creating a new document. I have managed to do this very basically using the <next record> feature however there may be hundreds of lines. Is there a way to get the text to appear in the next row of the table automatically like a repeat function rather than having hundred of lines of <next record>.

The second issue is I want to apply a filter to the data imported. I have three categories; high, medium and low and want anything in the high category to go in the 1st table (High) anything in the medium category to go in the 2nd table etc. but these are all in one document not separate documents. The high, medium or low information is within the data in excel.

Third issue is within the tables high medium low I want them to be alphabetical order so A-Z in high, A- Z in medium etc.

My first issue is the most important. I could work around the others with some cut and paste or splitting table but ideally I would want it to do everything to save me time.

Preferably I would like this to be done as simply as possible in case it breaks so I can fix it, but if macros etc are required then it will be worth the time saved copying and pasting.

So in summary I only want 1 document that contains all of the information in categories High, medium, Low in alphabetical order within these tables.

I hope I have provided all the required information, if you have any questions or suggestions please advise.

Would be really grateful for any help or advice that can be provided, currently got a sore arm from copy and paste.
Reply With Quote
  #2  
Old 06-18-2018, 12:29 PM
MP1989 MP1989 is offline Mail merge all fields into 1 document with rules Windows 10 Mail merge all fields into 1 document with rules Office 2010 64bit
Novice
Mail merge all fields into 1 document with rules
 
Join Date: Jun 2018
Posts: 9
MP1989 is on a distinguished road
Default

I have drafted up a document with the data at the top that would be in excel.

Then the table with the data laid out.

I forgot to mention, the top high, medium and low table is a summary with more detail in the tables beneath but with duplicate info from top tables.

Hope this makes sense

NB: I have just made the data up so the purpose wont make sense but its what I require
Attached Files
File Type: docx document1.docx (13.7 KB, 13 views)
Reply With Quote
  #3  
Old 06-19-2018, 11:54 AM
MP1989 MP1989 is offline Mail merge all fields into 1 document with rules Windows 10 Mail merge all fields into 1 document with rules Office 2010 64bit
Novice
Mail merge all fields into 1 document with rules
 
Join Date: Jun 2018
Posts: 9
MP1989 is on a distinguished road
Default Please help

Anyone have any thoughts?

Its driving me mad. I can get the records to continually repeat but as soon as I put a space or table below it goes everywhere.

Would be grateful for any suggestions?
Reply With Quote
  #4  
Old 06-19-2018, 06:22 PM
macropod's Avatar
macropod macropod is offline Mail merge all fields into 1 document with rules Windows 7 64bit Mail merge all fields into 1 document with rules Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

You can probably achieve what you're after with a combination of Word's Catalogue/Directory Mailmerge facility (the terminology depends on the Word version) and/or the use of DATABASE fields. To see how to use Word's Catalogue/Directory Mailmerge facility with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
https://www.msofficeforums.com/mail-...-tutorial.html
or:
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.

Depending on what you're trying to achieve, the field coding for this can be complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
https://www.msofficeforums.com/mail-...html#post23345
https://www.msofficeforums.com/mail-...html#post30327

As for the DATABASE field, see, for example:
https://www.msofficeforums.com/mail-...-multiple.html
and:
https://www.msofficeforums.com/mail-...html#post67097
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 06-21-2018, 07:39 AM
MP1989 MP1989 is offline Mail merge all fields into 1 document with rules Windows 10 Mail merge all fields into 1 document with rules Office 2010 64bit
Novice
Mail merge all fields into 1 document with rules
 
Join Date: Jun 2018
Posts: 9
MP1989 is on a distinguished road
Default

Thanks Paul,

I have had a look at this, great tutorial but as I'm only new to this struggling to see how I could apply it.

I think to make a list your suggestion of the database field looks to be the simpler option as I can easily add text before and after each table.

However I am still struggling with the below.

What I am looking for is an individual table 2 columns x 3 rows which includes one row of data from excel, and then for a space/line break/paragraph (whatever) followed by the same table but populated with the 2nd row of data repeating for all data in the spreadsheet.

This is way outside my skill set so would be grateful for any thoughts. If you look at the document I initially attached and then look at the bottom few tables this is what I mean but I have no idea how to go about this or if it is even possible!!

Would be grateful for your help
Reply With Quote
  #6  
Old 06-21-2018, 02:31 PM
MP1989 MP1989 is offline Mail merge all fields into 1 document with rules Windows 10 Mail merge all fields into 1 document with rules Office 2010 64bit
Novice
Mail merge all fields into 1 document with rules
 
Join Date: Jun 2018
Posts: 9
MP1989 is on a distinguished road
Default

I have done some more work on this and have managed to come up with the following attached.

I have managed to set up both part independently but cant manage to get them to run together properly. I added the database field to the header to prevent it from repeating in the main document, however this doesn't really work as the data disappears and for some reason repeats in the header?

Would you be able to have a look at this for me please? I would be grateful for any suggestions.

Also the repeating table is fine however it currently sort in high low medium (alphabetical order) is there a way to get high medium low?

What I have managed will save me a lot of time copying and pasting but I would still require to do some at the moment to get the two separate parts to run and then put into 1 document and also re-organise the mail merge tables into high medium low.

Thank you for any support you can provide
Attached Files
File Type: xlsx Book1.xlsx (8.9 KB, 10 views)
File Type: docx mailmerge & database field.docx (20.8 KB, 12 views)
Reply With Quote
  #7  
Old 06-27-2018, 04:43 PM
macropod's Avatar
macropod macropod is offline Mail merge all fields into 1 document with rules Windows 7 64bit Mail merge all fields into 1 document with rules Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Try the attached. I moved the DATABASE field back into the document body, inside the larger Directory merge field coding. As recoded, the DATABASE field looks for its source in the same folder as the mailmerge main document. There is no need for all the DATABASE field coding associated with the \c switch or for the double parentheses enclosing the "`Risk` =" tests.
Attached Files
File Type: docx mailmerge & database field.docx (19.8 KB, 25 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge all fields into 1 document with rules Mail Merge Using Rules "IF" to add additional Text Based On Merge Field Content Alfred Mail Merge 2 05-23-2017 10:59 PM
Using 3 different fields, several times in same document but not en mass - should I use mail merge? shoughton Mail Merge 1 06-24-2015 02:46 PM
Learning Mail Merge Rules lawlaw Mail Merge 7 11-01-2014 08:51 PM
Mail merge rules Barb D Mail Merge 0 03-18-2010 08:05 AM
Mail merge all fields into 1 document with rules Mail Merge If rules bordercollie10 Mail Merge 2 02-10-2009 12:43 PM

Other Forums: Access Forums

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