Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Accessing an uneven table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stein Kristiansen - 05 Jan 2006 09:55 GMT
I have a function detecting if all the cells in a table consist of text with
hidden font:
----------------------
Public Function OnlyHiddenTextinTable(oTable As Table) As Boolean
OnlyHiddenTextinTable = True
Dim oRow As Row
Dim oCell As Cell
For Each oRow In oTable.Rows
   For Each oCell In oRow.Cells
       If oCell.Range.Font.Hidden <> True Then
           OnlyHiddenTextinTable = False
           Exit Function
       End If
   Next 'oCell
Next 'oRow
End Function
-----------------
The function works fine until it runs into a table with merged cells, then
it crashes.

Does anyone have a workaround this problem?

Regards
Stein
Helmut Weber - 05 Jan 2006 10:13 GMT
Hi Stein,

like this:

Dim oCll As Cell
For Each oCll In ActiveDocument.Tables(1).Range.Cells
' some code
Next

Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
Stein Kristiansen - 05 Jan 2006 11:40 GMT
Thank you Helmut.

That works perfect.

Regards
Stein

> Hi Stein,
>
[quoted text clipped - 9 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.