howto get the text in a cell WITHOUT paragraph or end of cell marks?

D

Dave

Hi,

Using Word 97 in Win 98.
I'm populating a two-dimensional array with values from a
table, kind of converting the table to an array.

Documents.Open FileName:="C:\doc.doc"
With ActiveDocument.Tables(1)
Dim rcount As Integer
rcount = .Rows.Count
Dim arrAddBook(0 To rcount, 2) As String
For i = 1 To rcount
arrAddBook(i, 0) = .Cell(i, 0).Range.Text
arrAddBook(i, 1) = .Cell(i, 1).Range.Text
arrAddBook(i, 2) = .Cell(i, 2).Range.Text
Next i
End With
ActiveDocument.Close wdDoNotSaveChanges

My array values contain unwanted CRs.
Is there a way to get the text of the cell without the CRs?

P.S. Is there a better way to accomplish my goal?

Thanks!
Dave
 
J

JGM

Hi Dave,

Just a quick comment,

Please do not multipost... I have seen your post in 3 groups so far...

It is annoying for people who read the groups to find the same post as "New"
all the time, we can't follow the many threads. Also, someone may waste time
answering not knowing it was already answered in another group... It is also
a pain for you, you have to check all the groups where you posted to follow
up on your query.

So, it is better to crosspost, i.e., put all the groups address in the "To:"
field so that anyone reading your post in any of those groups can follow the
whole thread, and it won't show as "New" in another group if it has been
read before...

Finally, I was curious to see how your problem was solved. But all I had was
your enigmatic "Got it, thanks!" until I saw how it was solved n one of the
groups, but not in the other two I happened to read first...

Just trying to make the newsgroups more efficient for everyone!

Have a good day in the Garden State!
 

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