Sorting data according to the mm-yy in merged file

K

Kath

I have a question regarding merging.

Question
---------
Is there a way to sort the data at the same time it is
merged to the form letter?
I have in the data file information such as:
Institution Name Beginning and End of Year-MM
(WA) Whatcom C C 0601 0802
(CA) USC 0900 0601
(WA) U W 0399 0600

and I need to sort the order of the three schools into the
following (see below) based on the ending year and month
with the most recent at the bottom. I can use the
download data if I can get the mail merge to sort that
info for me but right now I have to reenter the names of
schools and their attendance dates in the above mentioned
order as such.

(WA) U W 0399 0600
(CA) USC 0900 0601
(WA) Whatcom C C 0601 0802

Do I have any hope?

Background
-----------
I have a mail merge job that is repeatedly done on well
over 3 thousand entries every year.

I use Access to get the data and I export the data into
Excel, then open in and convert it into a word .sf file so
that I can add additional information to some fields that
don't exist in the database in Access.

Thank you ever so much!

Kath
 
P

Peter Jamieson

word .sf file

What type of file is this?

If it is a Word document containing either tab-separated or comma-separated
fields, etc., or a table, you can use the Sort option in the Table menu to
sort on one to three columns before you merge.

As part of the merge specification, you can apply a sort. In Word 97/2000,
use the Query Options button in the Mail Merge Helper. In Word 2002 and
2003, go into the "Edit Recipients" dialog, select the drop-down arrow on
one of the column headings, and select Advanced... But you may find that
that apporach leads you somewhere you don't really want to go (such as MS
Query) or does not actually sort as you expect, so test carefully!
 
K

Kath

Hi Peter:
Thank you for taking the time to answer my odd question!
To clarify, I know how to sort a certain field of all
records in the data file.( BTW: *.sf is the secondary data
file created with MailMerge Help, or at least that is how
it is shown in my computer). My problem is, I have data
like the follow in the data file :

Student A school1 BeginDate1 EndDate1 School2
BeginDate2 EndDate2 School3 BeginDate3 EndDate3...

Student B school1 BeginDate1 EndDate1 School2
BeginDate2 EndDate2

Student C school1 BeginDate1 EndDate1

Student A school1 BeginDate1 EndDate1 School2
BeginDate2 EndDate2 School3 BeginDate3 EndDate3
School4 BeginDate4 EndDate4...

and I want to (if possible) auto sort the EndDate1,2,3
within each student's record accordingly.

Is there hope?

Thanks again!

Kath
 
D

Doug Robbins - Word MVP

So you mean that if EndDate2 is before EndDate1 that you want EndDate2 to
become EndDate1 and EndDate1 to become EndDate2?

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
P

Peter Jamieson

What to do depends on precisely what format you need to merge - if you have
multiple events/dates in /a single record/ then you are probably intending
to process using a specific technique in Word where you can assume a maximum
number of records. Off the top of my head I can't think of a /really/
straightforward to sort those records in Word - I would have to think in
terms of writing a Word VBA macro to do it, or import into Access (as Doug
suggested), normalise the data, sort, and re-aggregate the data in some way.
It might also be possible to do a sequence of merges to get the data how you
want it but
a. I'm not sure, and I won't be able to think about it for a few days
b. it seems liekly to be overkill - i.e. if you need to do that, you
probably need to think about producing the output a different way.
 
K

Kath

No. I mean when a person has attended multiple schools, we
put the schools in the order of their attendance as
indicated by their enddate with each school. So it looks
like we sorted the information of the schools by the
enddates. The begindates don't matter.
Hope it is clear. Thanks,

Kath
 
D

Doug Robbins - Word MVP

If you want to email the datafile to me I'll see if I can put a macro
together that will do what you want.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top