Odd characters at end of text

G

Greg Allen

I have some code that cycles through the table cells in a selection,
like this:

Dim Tag As String
Dim C as Cell
For Each C In W.Application.Selection.Range.Cells
Tag = C.Range.Text
' More stuff here.
Next

However, when I look at the value of C.Range.Text, it has 2 strange
characters at the end, an 0xd followed by an 0x7. I can understand
the 0xd (CR), but the 0x7 (bell) is confusing.

Why is this character there? Is it because the text is selected? Should
I always expect to see it there and strip it off?

Is this normal?

TIA,

-- Greg Allen
 
C

Cindy M -WordMVP-

Hi Greg,
However, when I look at the value of C.Range.Text, it has 2 strange
characters at the end, an 0xd followed by an 0x7. I can understand
the 0xd (CR), but the 0x7 (bell) is confusing.
= end-of-cell marker
Should
I always expect to see it there and strip it off?
Yes, defintely. And I usually strip off the CR, too. Both of these
are combined in the little "sunshine" symbol you see at the end of
each Word cell, if you have the display of non-printing characters
activated while viewing a Word document.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top