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 & "<A class=" & SM & "AHMark" & SM & _
"name=" & Vcell.Range.Text & _
">" & Vcell.Range.Text & "</a>"
End If
Next ss
AddCellE
Next Vcell
Next VRow
Next Vtab
AddTableE
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 & "<A class=" & SM & "AHMark" & SM & _
"name=" & Vcell.Range.Text & _
">" & Vcell.Range.Text & "</a>"
End If
Next ss
AddCellE
Next Vcell
Next VRow
Next Vtab
AddTableE