PPTX - Finding out whether text is bulleted from OpenXML
Asked Answered
B

1

6

I have not been able to find any indicator which could tell me whether text in txBody tag is bulleted or not, can you please me in identifying which indicator should I use to understand whether the text is bulleted or plain ?

-Thank you

Becharm answered 23/3, 2012 at 7:13 Comment(0)
S
3

Inside the txBody tag, you can look for the tags "a:buFont" and "buChar" which helps you identify that the text is bulleted. eg.

<a:buFont typeface="Arial" pitchFamily="34" charset="0"/>
<a:buChar char="•"/>

Update:

Hi, +1 For posting this question, learnt a lot from it.

After googling I found this link which addresses similar issue, the resoponse from Adamm clears this,

"Ok, so i think ive got this figured out. Basically if no formatting is specified in the layout or the slide, it goes to the master, and if its a 'title' or 'ctrTitle' shape it uses the formatting in and it defaults to lvl1. Same goes for text that is not in a title shape, for these it defaults to the formatting in and if no lvl is specified it defaults to lvl1. And another piece of advice, although not pertinent to my original question, there is another txStyle in the slideMaster, which is used for text in a shape that is not in a txBody."

Now the slide in your pptx is using "Office Theme" and the text you are interested in is in the format shape within the slide design. The bulletted text is inheriting from the slideMaster1.xml in SlideMasters.

As mentioned in the above quote the buletted text is getting inherited from "a:lvl1pPr" of "p:bodyStyle" in the slideMaster1.xml, also you can see the level 2 bullet is defaulted to "-" for the office Theme slide master there.

I tried to confirm this by changing the char = "•" to ">" to see the bulleting changed to ">" in the below line

<p:bodyStyle>
      <a:lvl1pPr marL="342900" indent="-342900" algn="l" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1">
        <a:spcBef>
          <a:spcPct val="20000"/>
        </a:spcBef>
        <a:buFont typeface="Arial" pitchFamily="34" charset="0"/>
        <a:buChar char="•"/>
        ....

Now if you want to change it programatically you can do this from slide master 1. But the only problem here is When we change the bulletted style here(like above), it is changing for all the slides and also for the future slides you will be creating with the same theme within your ppt.

Hope this helps.

Regards.

Spelter answered 23/3, 2012 at 10:3 Comment(6)
Somehow I am not able to find these tags in bulleted text of PPTX, can you please suggest some more alternatives ? -ThanksBecharm
That sounds interesting, could you please update your question with the xml of your pptx or could you please show your pptx you are working with?Spelter
I could not load it here cause of the file size, please check this link for Slide XML: onlinegamesbuzz.com/temp/slide2.xmlBecharm
Thanks for your help so far. PPT is actually created by someone else, I am just trying to extract data out of it. I have placed the PPTX at: onlinegamesbuzz.com/temp/stackoverflow.pptx. I am referring to the text that starts with: "This presentation ..." -ThanksBecharm
Thanks for so much useful info, I think I am finding hard is to link slide with slideMaster, which attribute can I use to establish this link ?Becharm
Also how do I find when the text moves to the next ?Becharm

© 2022 - 2024 — McMap. All rights reserved.