简体   繁体   中英

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.

这对我有用:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM