Reply
 
Thread Tools Display Modes
  #1   Report Post  
CoxProg CoxProg is offline
Junior Member
 
Posts: 1
Default Special Character at End of Each Table Cell

I am trying to test the contents of cells in a table. However, the special character found in each table cell throws me off. I have some options of getting around it (described below), but are there any other suggestions on how to work around this?

Here is my simplified code:

Dim TextToTest As String

TextToTest = ActiveDocument.Tables(1).Cell(Row:=1, Column:=1).Range.Text

If TextToTest = "Sought Value" Then
MsgBox "True"
Else
MsgBox "False"
End If

My result is always "False." When I look at the extracted value of TextToTest on a cell that contains "Sought Value", I get:

Sought Value
(the next line contains a bullet looking thing that this window will not let me paste into it)

That pesky character! I have rigged some ways around it by calculating the length of the TextToTest (x) and then extracting x-2 characters from the left.

But I am looking for an option that references that special character directly. Different threads suggest the special character is "^10" or "^008" but my tests for those characters didn't seem to work.

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
End of cell character for searching and replacing in a table? pjs Tables 5 April 29th 23 02:54 PM
Replace Wa(end of cell) with WA(end of cell) in table (Word 2000) MathKing Tables 2 January 3rd 10 05:51 AM
End-of-Table-Column Character fvmsad Microsoft Word Help 2 August 7th 09 11:51 PM
Find&Replace character before end-of-cell mark [email protected] Tables 6 November 27th 08 08:12 AM
End of table cell character. Larry Lester Microsoft Word Help 7 October 6th 05 02:25 PM


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