U
Umpty
I am walking down a table column looking for a specific string; during the
process, I encounter a character at the end of the string that resembles a
little square (forget what you call it). I try to use the Trim function, but
that does not remove it. The following is the code will hopefully help you
help me.
For i = 3 To TotRows
Dim TotLen As Integer, MyText As String, MyBkmrk As String
If strTableID = 9 Or strTableID = 12 Or strTableID = 14 Then
oApp.ActiveDocument.Tables(strTableID).Rows(i).Cells(2).Select
Else
oApp.ActiveDocument.Tables(strTableID).Rows(i).Cells(1).Select
End If
TotLen = Len(oApp.Selection.Text) - 2 (This line gets rid of most of the
little squares, but not in all cases. I know this is not the optimum way to
remove it.)
MyText = Trim(Left(oApp.Selection.Range, TotLen))
MyText = RTrim(MyText) (This line does not eradicate the little square"
MyBkmrk = strBkMrkPrefix & i
oApp.ActiveDocument.Close
oApp.Quit
OpenPicklistFile strTableID, MyText, MyBkmrk
Next i
If anyone could help, I would be most grateful.
Thanks
process, I encounter a character at the end of the string that resembles a
little square (forget what you call it). I try to use the Trim function, but
that does not remove it. The following is the code will hopefully help you
help me.
For i = 3 To TotRows
Dim TotLen As Integer, MyText As String, MyBkmrk As String
If strTableID = 9 Or strTableID = 12 Or strTableID = 14 Then
oApp.ActiveDocument.Tables(strTableID).Rows(i).Cells(2).Select
Else
oApp.ActiveDocument.Tables(strTableID).Rows(i).Cells(1).Select
End If
TotLen = Len(oApp.Selection.Text) - 2 (This line gets rid of most of the
little squares, but not in all cases. I know this is not the optimum way to
remove it.)
MyText = Trim(Left(oApp.Selection.Range, TotLen))
MyText = RTrim(MyText) (This line does not eradicate the little square"
MyBkmrk = strBkMrkPrefix & i
oApp.ActiveDocument.Close
oApp.Quit
OpenPicklistFile strTableID, MyText, MyBkmrk
Next i
If anyone could help, I would be most grateful.
Thanks