Why doesn't this comparison statement work?

N

Nick Transier

Here is a code segment I am using to do stuff conditioned on the formating
of the paragraph object para. I have a watch assigned to para.Format.Style
and it shows "Table Grid", but this expression will never evaluate as true!
Help.

ElseIf para.Format.Style = "Table Grid" Then
'testing stuff
para.Range.Select
'testing stuff
iTableCount = iTableCount + 1
Set tbl = DocA.Tables(iTableCount)
rng.Collapse wdCollapseEnd
rng.Text = tbl.ConvertToText(wdSeparateByCommas)

Thanks,
Nick
 
N

Nick Transier

OK, I figured out that I need to use para.Range.Style, so I guess my real
question is what is the difference between para.Range.Style and
para.Format.Style?

Thanks-Nick
 
Top