Solved

Mail merge and dynamic table

Posted on 2010-11-11
9
1,554 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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:teylyn
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

746 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now