D
Doug Robbins - Word MVP
Are we talking about Word here? Are you using a Tablet PC?
If both of these are true, create a template in which you create the
following macro and save it in the Word Startup Folder:
Sub MailMergePropagateLabel()
Dim atable As Table
Dim i As Long
Dim j As Long
Dim source As Cell
Dim target As Cell
Dim myrange As Range
Set atable = ActiveDocument.Tables(1)
Set source = atable.Cell(1, 1)
Set myrange = source.Range
myrange.Collapse wdCollapseStart
ActiveDocument.Fields.Add Range:=myrange, Text:="NEXT", _
PreserveFormatting:=False
source.Range.Copy
For j = 2 To atable.Columns.Count
Set target = atable.Cell(1, j)
If target.Range.Fields.Count > 0 Then
target.Range.Paste
End If
Next j
For i = 2 To atable.Rows.Count
For j = 1 To atable.Columns.Count
Set target = atable.Cell(i, j)
If target.Range.Fields.Count > 0 Then
target.Range.Paste
End If
Next j
Next i
atable.Cell(1, 1).Range.Fields(1).Delete
End Sub
--
Hope this helps,
Doug Robbins - Word MVP
Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
If both of these are true, create a template in which you create the
following macro and save it in the Word Startup Folder:
Sub MailMergePropagateLabel()
Dim atable As Table
Dim i As Long
Dim j As Long
Dim source As Cell
Dim target As Cell
Dim myrange As Range
Set atable = ActiveDocument.Tables(1)
Set source = atable.Cell(1, 1)
Set myrange = source.Range
myrange.Collapse wdCollapseStart
ActiveDocument.Fields.Add Range:=myrange, Text:="NEXT", _
PreserveFormatting:=False
source.Range.Copy
For j = 2 To atable.Columns.Count
Set target = atable.Cell(1, j)
If target.Range.Fields.Count > 0 Then
target.Range.Paste
End If
Next j
For i = 2 To atable.Rows.Count
For j = 1 To atable.Columns.Count
Set target = atable.Cell(i, j)
If target.Range.Fields.Count > 0 Then
target.Range.Paste
End If
Next j
Next i
atable.Cell(1, 1).Range.Fields(1).Delete
End Sub
--
Hope this helps,
Doug Robbins - Word MVP
Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.