Categories > OpenTBS with DOCX >

Using att= in DOCX

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Philip
Date: 2014-09-28
Time: 13:17

Using att= in DOCX

Hi, I have using TBS for a little while am still new to it, I am struggling to get my head around modifying the XML in a DOCX file, I think I should be using the att= command. What I am trying to do is change the Style of a heading in a document. I have tried a few combinations of the att= command but can never quite get it right, below is the closest I can get to...

This is the XML code from the word document...

<w:pPr>
     <w:pStyle w:val="Heading1"/>
</w:pPr>
<w:r>
    <w:t>My Heading 1 Text</w:t>
</w:r>

I am putting this TBS code next to "My Heading 1 Text"

[onshow. Document_Type;att=w:pPr#w:pStyle w:val]

<<w:pPr w:pStyle w:val="NewHeading">
     <w:pStyle w:val="Heading1"/>
</w:pPr>
<w:r>
    <w:t>My Heading 1 Text</w:t>
</w:r>

What I want to do is replace "Heading1" with "NewHeading". I think I have got back far enough but I am struggling to go forward into the w:pStyle part, thanks in advance.
By: Philip
Date: 2014-09-28
Time: 14:23

Re: Using att= in DOCX

I have fixed, I was just not understanding what it was doing properly and trying to make it to complex, this worked for me...

[onshow. Document_Type;att=w:pStyle#w:val]