Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Robert Secon
 
Posts: n/a
Default reading line from table cell into array

Hi,

I want to read a line from a table cell into an array. Just can not figure
out how to read the lines into arrays.

This is what I´ve got so far from

http://mypage.bluewin.ch/reprobst/Wo...htm#Tabellen05

Sub WordTabelleNachEindimensionalenArray1()
Dim x() As String
Dim oTable As Table, Zelle As Cell If ActiveDocument.Tables.Count = 0
Then
MsgBox "Das Dokument enthält keine Tabelle.", vbInformation
Exit Sub
End If Set oTable = ActiveDocument.Tables(1)
ReDim x(1 To oTable.Range.Cells.Count)
i = 0 'Oder auch -1, wenn der Array bei "0" beginnen soll
For Each Zelle In oTable.Range.Cells
i = i + 1
strText = Zelle.Range.Text
x(i) = Left(strText, Len(strText) - 2)
Next Zelle
End Sub
I can save the whole cell into the array, but not just one line. How should
this be changed?

Thanks in advance for every help

Rob


 
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
double window envelope tpdebronsky Page Layout 5 May 18th 23 08:51 PM
How to merge data into a table and keep it's contents in line Profjekyll Mailmerge 0 September 15th 05 01:49 PM
How to wrap text from cell to cell in a table. Jon Coulson Tables 2 August 8th 05 09:12 PM
Placing 1st table into a cell within 2nd table kathryngriffin1962 Tables 2 June 2nd 05 04:09 AM
word table cell resize or word table cell size change or word table change cell size [email protected] Tables 0 January 13th 05 09:55 PM


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