Content controls behaviour inside <w:p>

  • Thread starter Nasir Khan - VSTS Team
  • Start date
N

Nasir Khan - VSTS Team

Content controls inside <w:body> tag are only allowing us to press enter
keys, custom elements, <list> tags formatting. This scenario is mentioned in
the attached document “New Approach – Array and Statement tag.docxâ€. Content
controls inside body are extendable.
OpenXML for this scenario would be.
<w:body>
<w:customXml w:uri="http://schemas.microsoft.com/office" w:element="array">
<w:sdt>
<w:sdtPr>
<w:id w:val="90283052"/>
<w:placeholder>
<w:docPart w:val="DefaultPlaceholder_22675703"/>
</w:placeholder>
</w:sdtPr>
<w:sdtContent>
<w:p w:rsidR="00506299" w:rsidRDefault="00506299"
w:rsidP="00506299">
…
<w:p w:rsidR="00506299" w:rsidRDefault="00506299"
w:rsidP="00506299">
…
</w:p>
</w:sdtContent>
</w:sdt>
</w:customXml>
</w:body>

Content controls inside <w:p> tag(s) is not allowing to press enter key.
Its behaviour is like inline content control. In this scnerio we are unable
to support custom tags inside <w:p>. This scenario is mentioned in the
attached document “Statement inside p.docxâ€. In most of the PubMed XML we
require nesting of <p> tags and inside <p> we would required content controls.
<w:body>
<w:p>
<w:sdt>
<w:sdtPr>
<w:id w:val="90283052"/>
<w:placeholder>
<w:docPart w:val="DefaultPlaceholder_22675703"/>
</w:placeholder>
</w:sdtPr>
<w:sdtContent>
…
</w:sdtContent>
</w:sdt>
</w:p>
</w:body>

We would like to achieve:
Add content controls inside <w:p> where user should able to press enter key,
add bulleted list.
Let us know wheter you have any other approach for such scenarios.

As an example we want to generate custom tags content controls (OpenXML) for
below XML:
<sec sec-type="subsection" id="subsec2.2">
<title>2.2. Definitions of different repeats in DNA
sequences</title>
<p>
<statement id="d1">
<p> Some Test </p>
</statement>
<p> tttt </p>
</p>
</sec>

<sec> and <statement> custom tag requires content controls.
 
C

Cindy M.

Hi Nasir,

The best place for discussion of the OpenXML file format is
OpenXMLDeveloper.org. Posting in a newsgroup dedicated to VBA is not going to
get you a good discussion :)
We would like to achieve:
Add content controls inside <w:p> where user should able to press enter key,
add bulleted list.
Let us know wheter you have any other approach for such scenarios.
Logically, what you request is not possible. Paragraphs cannot be nested within
paragraphs. This is contrary to how Word functions - OpenXML cannot function in
a way contrary to how Word is designed. It must reflect how documents are
displayed and edited in Word.

The only way things in Word in the manner I understand you want to *see* is to
nest a table within a table cell. Then you could get a bulleted list where the
first entry would be "in-line" with the text next to it.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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

Similar Threads


Top