Reply
 
Thread Tools Display Modes
  #1   Report Post  
Ken Le Gall
 
Posts: n/a
Default Really New Newbie - Multiple Items - Question

Hi

I have to create a catalogue of our products which is held in MS Excel, now
I have done mail merging before and thats ok but I am getting stuck on the
following issue.

My data in Excel looks like this (there are loads of other fields but not
necessary here).:
308 14 Pink

308 15 Turquoise

311 08 Purple

311 09 Brown

311 16 Light Pink

311 18 Lt. Green

311 34 Black/White

327 04 Orange

327 06 Green

327 14 Pink



What I would like to do is have one record for all the 308, 311 and 327 like
this:

Record 1

This is my description for this Inventory

30814 Pink

30815 Turquoise

End Record



Record 2

This is my description for this Inventory

etc..etc...etc...



Can someone help this poor newbie, before I pull whats left of my hair out.



Many Thanks in advance.



Ken.


  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

Word does not really have the ability to perform a "multiple items per
condition (=key field)" mailmerge.

See the "Multiple items per condition" item under the "Special merges"
section of fellow MVP Cindy Meister's website at

http://homepage.swissonline.ch/cindy...r/MergFram.htm

Or, if you create a Catalog (on in Word XP and later, it's called Directory)
type mailmerge main document with the mergefields in the cells of a one row
table in the mailmerge main document with the keyfield in the first cell in
the row and then execute that merge to a new document and then run the
following macro, it will create separate tables with the records for each
key field in them. With a bit of further development, you may be able to
get it to do what you want.

' 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


--
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
"Ken Le Gall" wrote in message
...
Hi

I have to create a catalogue of our products which is held in MS Excel,
now
I have done mail merging before and thats ok but I am getting stuck on the
following issue.

My data in Excel looks like this (there are loads of other fields but not
necessary here).:
308 14 Pink

308 15 Turquoise

311 08 Purple

311 09 Brown

311 16 Light Pink

311 18 Lt. Green

311 34 Black/White

327 04 Orange

327 06 Green

327 14 Pink



What I would like to do is have one record for all the 308, 311 and 327
like
this:

Record 1

This is my description for this Inventory

30814 Pink

30815 Turquoise

End Record



Record 2

This is my description for this Inventory

etc..etc...etc...



Can someone help this poor newbie, before I pull whats left of my hair
out.



Many Thanks in advance.



Ken.




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
newbie question; working with Word paxton Microsoft Word Help 2 February 2nd 05 05:10 PM
Newbie document question please Dudley Henriques New Users 4 January 9th 05 08:38 PM
Mail Merge Multiple Deletes and Auto Return Government Grunt Mailmerge 1 December 18th 04 04:47 PM
Multiple docs open multiple words Ron Smith New Users 2 December 11th 04 09:21 PM
Need multiple Ifs in Merge Fields Pat Cortez Mailmerge 1 November 30th 04 01:11 AM


All times are GMT +1. The time now is 05:26 AM.

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"