Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Yookaroo Yookaroo is offline
external usenet poster
 
Posts: 7
Default Layout of Data in tables

I have a table with 3 columns I have product fields 1 to 21 in the first
column, the second is a spacer and I have products 22 to 41 in the third.

I want the third column to always start with 22 or above, but when certain
records have less than 21 in the first column 22 and above will show up in
the 1st column again?

I even tried this with columns (with column break) yet the fields 1 to 41
seem to always stay together.

Also if I want a hard return after a field how do I put that into the mail
merge statement?

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Layout of Data in tables

If you are merging into a table, the merge will always track across the
table from left to right. What you see displayed in the merge source
document does not reflect the result of the final merge. It only affects the
current record. See http://www.gmayor.com/mail_merge_lab...th_word_xp.htm
or http://www.gmayor.com/merge_labels_with_word_2007.htm
If you want the merge to fill the first column of the table before starting
the second (or in your case third) you would have to reorganise your data
source to take account of the different order. If that data source is a word
table then the following macro will order it. The defaults assume a merge
document table with 2 columns and 21 rows.

"Also if I want a hard return after a field how do I put that into the mail
merge statement"
You'll have to be a bit more explicit about what you mean by this that is
not covered by pressing the enter key after inserting the field.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Sub SortData()
' Macro to assign numbers to data source so that it can be sorted to cause
'labels to print down columns
Dim Message, Title, Default, labelrows, labelcolumns, _
i As Integer, j As Integer, k As Integer
Message = "Enter the number of labels in a row" ' Set prompt.
Title = "Labels per Row" ' Set title.
Default = "2" ' Set default.
' Display message, title, and default value.
labelcolumns = InputBox(Message, Title, Default)
Message = "Enter the number of labels in a column" ' Set prompt.
Title = "Labels per column" ' Set title.
Default = "21" ' Set default.
labelrows = InputBox(Message, Title, Default)
With ActiveDocument.Tables(1)
..Columns.Add BeforeColumn:=ActiveDocument.Tables(1).Columns(1)
..Rows(1).Range.Cut
End With
k = 1
For i = 1 To ActiveDocument.Tables(1).Rows.Count - labelcolumns
For j = 1 To labelrows
ActiveDocument.Tables(1).Cell(i, 1).Range.InsertBefore _
k + (j - 1) * labelcolumns
i = i + 1
Next j
k = k + 1
i = i - 1
If k Mod labelcolumns = 1 Then k = k - labelcolumns + _
labelcolumns * labelrows
Next i
ActiveDocument.Tables(1).Sort FieldNumber:="Column 1"
ActiveDocument.Tables(1).Rows(1).Select
Selection.Paste
ActiveDocument.Tables(1).Columns(1).Delete
End Sub


Yookaroo wrote:
I have a table with 3 columns I have product fields 1 to 21 in the
first column, the second is a spacer and I have products 22 to 41 in
the third.

I want the third column to always start with 22 or above, but when
certain records have less than 21 in the first column 22 and above
will show up in the 1st column again?

I even tried this with columns (with column break) yet the fields 1
to 41 seem to always stay together.

Also if I want a hard return after a field how do I put that into the
mail merge statement?

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
how to layout 50 page document with tables MaryBB Page Layout 1 May 24th 07 05:59 PM
Need help with layout - use of tables cottonchipper Microsoft Word Help 2 June 24th 06 04:08 PM
Page Layout with Tables - Help Please Bryan Bloom Page Layout 4 March 21st 06 01:01 AM
Correct layout of large pictures / tables Jens Meier Formatting Long Documents 1 November 22nd 05 10:21 AM
Correct layout of large pictures / tables Jens Meier Page Layout 0 November 6th 05 06:28 PM


All times are GMT +1. The time now is 10:36 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"