Tables inside paragraph object

D

Doug Robbins

A table cannot be contained wholly within a paragraph. You can tell if a
range includes a table by using .Range.Tables.Count

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
H

Helmut Weber

Hi Roger,

just for fun,
if you want to know whether a paragraph is preceded by a table:

With Selection.Paragraphs(1).Range.Characters.First
If Not .Information(wdWithInTable) And _
.Previous.Information(wdWithInTable) Then
MsgBox "1st paragraph in selection is preceded by a table"
Else
MsgBox "1st paragraph in selection is not preceded by a table"
End If
End With

note that if the paragraph is in a table,
it is not preceded by a table.

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top