Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / August 2004

Tip: Looking for answers? Try searching our database.

How to Merge Conditional Number of Records to Same Page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sara - 11 Aug 2004 17:13 GMT
I have visited the link below to try and followed the
method described, but it does not produce the right
results.

http://support.microsoft.com/?kbid=212375

First when I type the {set duplicate ...} this gets change
automatically to <<Next Record if>> when I click on toggle
field code it says 'next record if " "' but nothing about
anything else.

Using the data given on the web link the results I get are

Dear Scott Cooper

4578j
8678x
543p
543p
-- page break --

Dear Meng Phua

87x
89976m
89976m
89976m
--page break--
Dear Kim yoshida

7897r
857t
78974x
7868p
--page break--

Obviously the problem is it is repeating the last record
however many times it is need to match the maximum number
of entries.  So it is not skipping to the next record
properly.

I have also looked at:
http://homepage.swissonline.ch/cindymeister/MergFram.htm
and
http://www.knowhow.com/Guides/CompoundMerges/CompoundMerge.
htm

But I found them too complicated.  The original link is
what I want and it should work, so I don't understand what
I'm doing wrong!  

PLEASE HELP!  I am ready to throw the computer at the wall.

Sara
Badger - 11 Aug 2004 19:46 GMT
Sara,

Try
http://support.microsoft.com/?kbid=294686

This is a far better example of how it all works and a lot easier to
understand.
If you're still baffled after reading this, let me know and I'll try to
help.
Done a few of these successfully in the past myself.

Regards
Paul

> I have visited the link below to try and followed the
> method described, but it does not produce the right
[quoted text clipped - 50 lines]
>
> Sara
Sara - 12 Aug 2004 14:37 GMT
I'm sorry!  It's still not working!  The link below is for
Word 2002 and I am using 2000.  Therefore I cannot follow
the instructions properly.  For example can I make
a "directory" document type in 2000?

Any more ideas would be great!
Sara
>-----Original Message-----
>Sara,
[quoted text clipped - 55 lines]
>> http://homepage.swissonline.ch/cindymeister/MergFram.htm
>> and

http://www.knowhow.com/Guides/CompoundMerges/CompoundMerge.
>> htm
>>
[quoted text clipped - 7 lines]
>
>.
Badger - 12 Aug 2004 17:44 GMT
OK then, try http://support.microsoft.com/?kbid=211303.
Its basically the same thing but for Word 2000.

Only used Word 2000 myself and have got the 2002 version to work.
But anyway, have a look and see if it makes any more sense !
If not, send me some sample data and what you're trying to achieve and we'll
go from there.

Regards
Paul

> I'm sorry!  It's still not working!  The link below is for
> Word 2002 and I am using 2000.  Therefore I cannot follow
[quoted text clipped - 87 lines]
> >
> >.
Doug Robbins - 12 Aug 2004 00:37 GMT
Try this instead on the document created by executing a catalog mailmerge
with the merge fields in the cells of a single row table with the "key"
mergefield in the first cell.

' Macro to create multiple items per condition in separate tables from a
directory type mailmerge

Dim source As Document, target As Document, scat As Range, tcat As Range

Dim data As Range, stab As Table, ttab As Table

Dim i As Long, j As Long, k As Long, n As Long

Set source = ActiveDocument

Set target = Documents.Add

Set stab = source.Tables(1)

k = stab.Columns.Count

Set ttab = target.Tables.Add(Range:=Selection.Range, numrows:=1,
numcolumns:=k - 1)

Set scat = stab.Cell(1, 1).Range

scat.End = scat.End - 1

ttab.Cell(1, 1).Range = scat

j = ttab.Rows.Count

For i = 1 To stab.Rows.Count

   Set tcat = ttab.Cell(j, 1).Range

   tcat.End = tcat.End - 1

   Set scat = stab.Cell(i, 1).Range

   scat.End = scat.End - 1

   If scat <> tcat Then

       ttab.Rows.Add

       j = ttab.Rows.Count

       ttab.Cell(j, 1).Range = scat

       ttab.Cell(j, 1).Range.Paragraphs(1).PageBreakBefore = True

       ttab.Rows.Add

       ttab.Cell(j + 1, 1).Range.Paragraphs(1).PageBreakBefore = False

       For n = 2 To k

           Set data = stab.Cell(i, n).Range

           data.End = data.End - 1

           ttab.Cell(ttab.Rows.Count, n - 1).Range = data

       Next n

   Else

       ttab.Rows.Add

       For n = 2 To k

           Set data = stab.Cell(i, n).Range

           data.End = data.End - 1

           ttab.Cell(ttab.Rows.Count, n - 1).Range = data

       Next n

   End If

Next i

Signature

Please respond to the Newsgroup for the benefit of others who may be
interested.   Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP

>I have visited the link below to try and followed the
> method described, but it does not produce the right
[quoted text clipped - 50 lines]
>
> Sara

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.