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
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