Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot access rows / vertically merged cells

Status
Not open for further replies.

kesm

Technical User
Jul 8, 2002
19
0
0
GB
Im am trying to progmatically readin a word document, bookmark certain sections and save this out as an asp file with hyperlinks and menus added.

When reading through the doc i recieve an error (Accessing individual rows in this collection because a table has vertically merged cells) Message.

Because I want this to run every fortnight (when our trust publishes its waiting times), I ai'nt gonna remember to do this indefinately.. and the one time i forget, thats the time it will be noticed.

How can I look through each cell in a table and ignore the Vertically merged cells.

Heres the code im using to read through the tables:

For Each Vtab In wDDoc.Tables
AddTable
For Each VRow In Vtab.Rows
AddRow
For Each Vcell In VRow.Cells
AddCell
For ss = 0 To 43
If (InStr(1, strSearchFor(ss), Vcell.Range.Text,
vbTextCompare) > 1) Then
Bookmarks(ss) = Vcell.Range.Text
strWrd = strWrd & &quot;<A class=&quot; & SM & &quot;AHMark&quot; & SM & _
&quot;name=&quot; & Vcell.Range.Text & _
&quot;>&quot; & Vcell.Range.Text & &quot;</a>&quot;
End If
Next ss
AddCellE
Next Vcell
Next VRow
Next Vtab
AddTableE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top