Solved

Mail Merge Template - last record in datasource?

Posted on 2001-07-23
5
254 Views
Last Modified: 2011-10-03
There may be another way around this, so I'll explain my dilemma before jumping into the question...

I'm trying to do a mail merge where I have some header information, some detail information and then a closing.  

This isn't exactly what I'm doing, but a simple example would be something like:
-------------------------------------------
Name: [Fred Bloggs]

Subject    Grade
[Physics]   [A]
[Chemistry] [A-]
[English]   [B+]

Well done [Fred], keep up the good work!
-------------------------------------------
...where the bits in [] are values from data fields (and we're only dealing with records for Fred Bloggs - no other students are involved, and the number of subjects is variable)

An MSDN search has suggested that I should be able to achieve this by setting it up as a Catalog merge type (to do the "Subject/Grade" detail part), and using {IF {MERGESEQ} = "1" ....} syntax in the template to do the header bit (from "Name:" through to the subject/grade table heading).

All of that works fine!
The trouble I have is trying to get the closing in - if it was just text, I could put it in the page footer or something I'm sure, but it uses a data field, and so I need to do it when I reach the last record - but how can I tell, within the template, that I have reached the last record of the datasource? (BTW - I'm using Office 97)
Or alternatively, how else could I get the closing in?
0
Comment
Question by:lurch36
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:Dreamboat
ID: 6312274
Potential only: Try putting your closing into a table cell, or putting the grades part in one table cell and the closing in another.
0
 

Author Comment

by:lurch36
ID: 6315414
I tried that (both options), but it didn't work...
Using my simplistic example again, the effect that both of these have is as follows:
-------------------------------------------
Name: [Fred Bloggs]

Subject    Grade
[Physics]   [A]

Well done [Fred], keep up the good work!
[Chemistry] [A-]

Well done [Fred], keep up the good work!
[English]   [B+]

Well done [Fred], keep up the good work!
-------------------------------------------
0
 
LVL 22

Accepted Solution

by:
Dreamboat earned 150 total points
ID: 6317096
See this site: http://www.mvps.org/word/FAQs/MailMerge/CreateAMailMerge.htm

I haven't done the catalog thing myself, but I've pointed others here and they've been pleased. I hope you are too.

I build my mailmerges myself, generally, when they're weird like this, so I'd really need to see your file and a sample of the data to work it out. (not good with the conceptual stuff I'm afraid!)

But you can email to techsupportgirl@home.com if you want.
0
 

Author Comment

by:lurch36
ID: 6320184
Thanks for your help Dreamboat.
It turned out that between the time I registered the question and read your answer, it was decided to do this one (and some others) in Crystal Reports instead of Word, so my question is no longer relevant.  However, I do have other Mail Merge things to do, and that web-site you pointed me to is quite good and comprehensive, so you can have the points and an "A" anyway!
0
 
LVL 22

Expert Comment

by:Dreamboat
ID: 6320220
Why, thank you, sir!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

696 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