Solved

Mail merge and dynamic table

Posted on 2010-11-11
9
1,653 Views
Last Modified: 2012-06-27
I've got a letter including a table and an Excel sheet with address information and elements that have to appear in the table. the point is: the elements vary in their number. some customers have 2, some 4 and some 7 elements to appear in the table on the letter. is there a way to keep the table dynamic? say, 2 appearing rows if there are 2 elements to show, 5 rows if there are 5 elements. thanx for any hint!
0
Comment
Question by:webeng
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 34111743
webeng,With a straight mail merge, probably not, although it can possibly be accomplished with a little VBA wizardry.  Please post sanitized examples of your data file and merge file.Please be advised that once you upload a file, it can be publicly accessed, and that it may not be possible to fully and permanently delete it.  The file may also be indexed by the major search engines.Therefore, be very careful about posting proprietary, confidential, or other sensitive information.  If necessary, use "fake" and/or obfuscated data in your sample.Another alternative: you may actually find this easier to do as an Access report instead of a mail merge.  Let me know if you are willing to consider that alternative.Patrick
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 34112155
If you only have a limited number of the elements, they can be placed in separate columns in your spreadsheet.

Then put a field in the mail merge main  document for each of the optional columns

 <<CUSTOMER NAME>> <<CUSTOMER NUMBER>>
<<ADDRESS>>

<<COLUMN4>>
<<COLUMN5>>
<<COLUMN6>>
<<COLUMN7>>
<<COLUMN8>>
<<COLUMN9>>
<<COLUMN10>>
<<COLUMN11>>

Blank lines will automatically be deleted in the result
0
 

Author Comment

by:webeng
ID: 34112196
Here's a very quick and dirty merge. The Excel Sheet would be in exact the format i will get it from client. One of course could think of say making two Sheets out of it or normalizing it in another useful way.

Speaking of the Access Report: The result of whole work has to come out in form of a Word Doc. About 1500 Word documents actually. However we get there is another story.
ExcelSample.jpg
Merge1.jpg
0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 34112369
webeng,The images you uploaded appear blank.  In any event, uploading actual Excel and Word files would be far more helpful.Patrick
0
 

Author Comment

by:webeng
ID: 34118411
oh, you're right. i this time attached a word and an example sample. they the column names both in word and excel are in german. i hope that doesn't confuse too much. however, i will upload an english version on monday. SampleData.xlsx SampleLetter.doc
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 34118751
The layout of the data makes it suitable for this approach using IF and SEQ fields:

http://support.microsoft.com/kb/294686/
0
 

Author Comment

by:webeng
ID: 34120870
that looks interesting. i will follow it and come back with a feedback next week. thanx!
0
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 34415218
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question