to StackOverflow
to StackOverflow

Reputation: 124794

How to find Cell that contains a Range in Word VBA

In Word VBA I have a reference to a Range that is contained withing a table cell.

How can I get a reference to the containing cell (the innermost cell if there are nested tables)?

What I'm trying to achieve is to find the cell containing my range, then move to the next adjacent cell.

Upvotes: 1

Views: 893

Answers (1)

Tim Williams
Tim Williams

Reputation: 166790

This worked for me:

Debug.Print rng.Cells(1).Next.Range.Text 

Upvotes: 3

Related Questions