Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bosconian Bosconian is offline
external usenet poster
 
Posts: 4
Default creating numbered lists from datasource

This seems like it should be easy, but I can't seem to find the answer.

I need to create a numbered list in Word from a datasource containing a
dynamic number of rows.

For example:

1. Paragraph text #1

2. Paragraph text #2

3. Paragraph text #3

How do you loop through a recordset using the same merge fields?

I've tried

{ MERGEFIELD ParagraphText }{ Next Record }

but this will only output the first record. I need a 'goto' type function to
loop through all the records.

Thanks in advance.


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bosconian Bosconian is offline
external usenet poster
 
Posts: 4
Default creating numbered lists from datasource

"Bosconian" wrote in message
. ..
This seems like it should be easy, but I can't seem to find the answer.

I need to create a numbered list in Word from a datasource containing a
dynamic number of rows.

For example:

1. Paragraph text #1

2. Paragraph text #2

3. Paragraph text #3

How do you loop through a recordset using the same merge fields?

I've tried

{ MERGEFIELD ParagraphText }{ Next Record }

but this will only output the first record. I need a 'goto' type function
to loop through all the records.

Thanks in advance.


After some additional investigating, I have concluded that Word (2K) doesn't
have a built-in way to loop through a record set using the same merge field.
So you'll need to hardcode the maximum number of items your template is
expected to include.

So, the easiest way to accomplish this is by doing something like the
following:

{ IF {MERGEFIELD questiontext } "" "{MERGEFIELD questiontext }" ""}{
NEXT }

If you want each item numbered, simply highlight the merge field (the output
portion, not the condition) and choose your preferred number format via
Format-Bullets and Numbering. In this case the merge data display should
look like this:

{ IF {MERGEFIELD questiontext } "" "{MERGEFIELD questiontext }
1. " ""}{ NEXT }
{ IF {MERGEFIELD questiontext } "" "{MERGEFIELD questiontext }
2. " ""}{ NEXT }
{ IF {MERGEFIELD questiontext } "" "{MERGEFIELD questiontext }
3. " ""}{ NEXT }
{ IF {MERGEFIELD questiontext } "" "{MERGEFIELD questiontext }
4. " ""}{ NEXT }
{ IF {MERGEFIELD questiontext } "" "{MERGEFIELD questiontext }
5. " ""}{ NEXT }

Note the line break placement, which will be included in the output.

Happy merging.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default creating numbered lists from datasource

You should use a catalog or directory type mailmerge main document.
However, I suspect that you are probably trying to perform a "multiple items
per condition (=key field)" mailmerge which Word does not really have the
ability to do:

See the "Group Multiple items for a single condition" item on fellow MVP
Cindy Meister's website at

http://homepage.swissonline.ch/cindy...faq1.htm#DBPic

Or take a look at the following Knowledge Base Article

http://support.microsoft.com/default...b;en-us;211303

http://www.knowhow.com/Guides/Compou...poundMerge.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Bosconian" wrote in message
. ..
This seems like it should be easy, but I can't seem to find the answer.

I need to create a numbered list in Word from a datasource containing a
dynamic number of rows.

For example:

1. Paragraph text #1

2. Paragraph text #2

3. Paragraph text #3

How do you loop through a recordset using the same merge fields?

I've tried

{ MERGEFIELD ParagraphText }{ Next Record }

but this will only output the first record. I need a 'goto' type function
to loop through all the records.

Thanks in advance.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating lists as I did in Word 97 Karen B New Users 6 February 11th 06 06:13 AM
Wrong numbers in numbered lists SAn Microsoft Word Help 7 September 15th 05 06:44 PM
Numbered Lists Anna Summers Microsoft Word Help 9 July 4th 05 06:06 AM
bullets and numbered lists apply to ALL styles Mark at Icom Microsoft Word Help 3 May 26th 05 01:17 PM
restart numbered lists in master documents usergal Microsoft Word Help 1 February 23rd 05 02:27 PM


All times are GMT +1. The time now is 07:45 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"