Group: microsoft.public.word.vba.general
From: Tony Strazzeri
Date: Sunday, March 23, 2008 11:04 PM
Subject: Re: vba to determine if text attribute (eg. of a table) is "hidden"


The result of Selection.Font.Hidden will be:
true if ALL of the text is formatted as hidden
False if All of the text is formatted as NOT hidden

Undefined if there is a mixture.

Your code does not allow for the last option

Also:


> Selection.GoTo What:=wdGoToBookmark, Name:="Tableofreplacements"
> Selection.Tables(1).Select

These two lines may change the selected table. First you are
selecting a table by a bookmark (presumably) places around it, then
you care changing the selection to be the first table in the document.

You only need one or the other. They may not be the same thing.


>
> oRng1.Range.Font.Hidden = True
>
> Selection.HomeKey Unit:=wdStory
>
> Selection.GoTo What:=wdGoToBookmark, Name:="Tableofreplacements"
> Selection.Tables(1).Select
> Set oRng1 = Selection.Tables(1)

Here there is the same problem as above and I can't see what these
last three lines are there for anyway!

Hope this helps.

Cheers!
TonyS.

Safety Articles | Usenet Groups | Usenet News | Bluegrass