Reference from one object to the table object? RRS feed

  • Question

  • Greetings,

    in my word document, I have many content controls.

    I have a loop through all my content controls:

    for each ccField in document.ContentControls

    Now, many content Controls are in a cell in a table. table -> cell -> content control

    Now I have only the content control object (ccField).

    How can I get from my Content Control the table object now?

    Thank you!


    Tuesday, January 7, 2014 1:08 PM


  • Does this do what you need?

    Dim oTable As Word.Table

    If ccField.Range.Tables.Count > 0 then
      Set oTable = ccField.Range.Tables(1)
    End If

    Peter Jamieson

    Wednesday, January 8, 2014 8:38 AM

All replies