S
Sol Apache
I have this code:
Dim myRg As Range
Set myRg = _
ActiveDocument.Tables(1).Cell(Row:=4, Column:=2).Range
With myRg
.Text = TxtMainName.Value & Chr(13)
.Style = ("NameSurname")
.Collapse wdCollapseEnd
.Text = TxtDivision.Value & Chr(13)
.Style = ("DivisionalName")
.Collapse wdCollapseEnd
.Text = TxtJobTitle.Value
.Style = ("JobTitle")
..Collapse wdCollapseEnd
End With
For some reason the first line goes into row 4, column 2,
But the remaining two rows go into row 4 column 3.
Have checked other rows in the table, and I get the same result: line 1 goes
into designated column, lines 2 & 3 go into next column.
What is wrong?
Dim myRg As Range
Set myRg = _
ActiveDocument.Tables(1).Cell(Row:=4, Column:=2).Range
With myRg
.Text = TxtMainName.Value & Chr(13)
.Style = ("NameSurname")
.Collapse wdCollapseEnd
.Text = TxtDivision.Value & Chr(13)
.Style = ("DivisionalName")
.Collapse wdCollapseEnd
.Text = TxtJobTitle.Value
.Style = ("JobTitle")
..Collapse wdCollapseEnd
End With
For some reason the first line goes into row 4, column 2,
But the remaining two rows go into row 4 column 3.
Have checked other rows in the table, and I get the same result: line 1 goes
into designated column, lines 2 & 3 go into next column.
What is wrong?