E
Ed
This loops through each cell of each table to replace paragraph marks in
cells with spaces. The looping works fine - the Replace does not! Can
someone please drop-kick me in the right direction?
Ed
Sub ReplParas()
Dim d As Document
Dim t As Table
Dim x As Long
Dim c As Cell
Dim str1 As String, str2 As String
str2 = chr(13)
Set d = ActiveDocument
For x = 1 To d.Tables.Count
Set t = d.Tables(x)
For Each c In t.Range.Cells
str1 = c.Range.Text
str1 = Left(str1, Len(str1) - 2)
Replace str1, str2, " "
c.Range.Text = str1
Next c
Next x
End Sub
cells with spaces. The looping works fine - the Replace does not! Can
someone please drop-kick me in the right direction?
Ed
Sub ReplParas()
Dim d As Document
Dim t As Table
Dim x As Long
Dim c As Cell
Dim str1 As String, str2 As String
str2 = chr(13)
Set d = ActiveDocument
For x = 1 To d.Tables.Count
Set t = d.Tables(x)
For Each c In t.Range.Cells
str1 = c.Range.Text
str1 = Left(str1, Len(str1) - 2)
Replace str1, str2, " "
c.Range.Text = str1
Next c
Next x
End Sub