Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-01-2014, 04:57 AM
Chris Wong Chris Wong is offline Mail Merge on Optional Row(s) of a Table Windows 7 64bit Mail Merge on Optional Row(s) of a Table Office 2010 64bit
Novice
Mail Merge on Optional Row(s) of a Table
 
Join Date: Mar 2014
Posts: 2
Chris Wong is on a distinguished road
Default Mail Merge on Optional Row(s) of a Table

To Admin.,



May I know how to perform the mail merge from excel for optional row(s) of a table in word as attached below:


Thank you very much in advance!!

Chris
Attached Images
File Type: jpg Word_Mail-Merge.jpg (84.5 KB, 60 views)
Reply With Quote
  #2  
Old 03-02-2014, 03:46 AM
macropod's Avatar
macropod macropod is offline Mail Merge on Optional Row(s) of a Table Windows 7 32bit Mail Merge on Optional Row(s) of a Table 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

All that needs is some IF fields to conditionally output the optional data.
For example:
{IF{MERGEFIELD Status1}= "Y" "the table row for Status1 goes here"}
{IF{MERGEFIELD Status2}= "Y" "the table row for Status2 goes here"}
Although this generates a separate physical table for each row, you can minimise the gap by formatting the intervening paragraph spaces (which have to be included in the field code anyway) as hidden. The alternative is to test for all possibilities via IF fields and output a single table having anything from 1 to 3 rows, according to which conditions are met.

Note: The field brace pairs (ie '{ }') for the above examples are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-02-2014, 12:02 PM
Chris Wong Chris Wong is offline Mail Merge on Optional Row(s) of a Table Windows 7 64bit Mail Merge on Optional Row(s) of a Table Office 2010 64bit
Novice
Mail Merge on Optional Row(s) of a Table
 
Join Date: Mar 2014
Posts: 2
Chris Wong is on a distinguished road
Default

Dear macropod,

Thank you very much, and it's working fine!!

Have learnt lots of skills in the meantime too : )

Best Regards,
Chris
Reply With Quote
  #4  
Old 08-21-2019, 12:55 PM
jsigs jsigs is offline Mail Merge on Optional Row(s) of a Table Windows 10 Mail Merge on Optional Row(s) of a Table Office 2019
Novice
 
Join Date: Aug 2019
Posts: 1
jsigs is on a distinguished road
Default

I have the same use case for the optional rows. Is there a way to include a column in the table that will number the rows correctly (1, 2, 3) depending on which rows are visible? I used the SEQ field and it counts the rows that are hidden with the IF statement, so an example would show Row 1, Row 3, Row 5 and I want it to display 1,2,3 but it still shows 1,3,5. Is there a way to do this conditional numbering in the mail merge?

Also, how do you minimize the spacing between the individual tables? I am unable to remove the paragraph symbol between the " and the inserted table, or replace it with a line break.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge on Optional Row(s) of a Table Mail Merge to create specific number of table rows flackend Mail Merge 4 12-01-2023 02:49 PM
Directory Mail Merge with table layout 3N1GM4 Mail Merge 11 06-03-2014 09:54 PM
Mail Merge on Optional Row(s) of a Table Mail Merge Into Dynamic Table Jag618 Mail Merge 1 03-04-2013 11:26 PM
Mail Merge on Optional Row(s) of a Table mail merge with table nadja Mail Merge 5 03-06-2012 05:41 PM
Insert formatted table into word (mail merge) manojbmsce Mail Merge 0 09-25-2008 02:25 AM

Other Forums: Access Forums

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