contentcontrol inside table

Home Forums WordprocessingML contentcontrol inside table

This topic contains 2 replies, has 2 voices, and was last updated by  hoang.mufc 7 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3863

    hoang.mufc
    Participant

    hi guys,
    someones can help me?
    i have a word (.docx) file like that
    docx file
    2 contencontrols in side 2 cells of second row
    but int xml file like bellow
    xml file
    <w:tc> tag inside <w:sdtContent> tag

    when i select root element by code:
    XElement root = wordprocessing.MainDocumentPart.GetXDocument().Root
    i received table with one rows (have no second row)

    #3872

    Eric White
    Keymaster

    Hi,

    I am unclear on your question.

    When you place a block-level content control in a cell, the w:sdt (and w:sdtContent) surround the w:tc element, as your image shows.

    Are you saying that when you get the root element, you see within the root element a table with only one row? This seems pretty surprising to me, and I suspect that I am misunderstanding your question.

    You may be interested in using the Open XML Package Editor PowerTool.

    See screen-cast #4 in the following series:

    Introduction to Open XML

    Best, Eric

    #3889

    hoang.mufc
    Participant

    i don’t know why sdtblock surround w:tc but sdt run is inside w:tc?

    sorry, root element is right.

    if sdtblock surround w:tc, HTMLconvert work fail. So i received table with no second row.
    when i place some text before or after contentcontrol, sdtblock change to sdt run, HTMLconvert work true. the second row appear.

    • This reply was modified 7 years, 6 months ago by  hoang.mufc.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.