Consulting

Results 1 to 5 of 5

Thread: "Smart" bullet point behavior

  1. #1
    VBAX Regular
    Joined
    Feb 2012
    Posts
    7
    Location

    Unhappy "Smart" bullet point behavior

    Sorry about the poor title, but I don't know the proper term to describe it. Let me explain what I mean.

    In our PowerPoint template, we have a bullet scheme defined in (I think) customlayouts. The scheme looks like this:

    1st list level (no indent) = no bullet
    2nd list level = square bullet
    3rd and 4th list level = line bullet



    In the template, there are text boxes (shape.type = 17) with a behavior that I would like to reproduce. Let me describe.
    When user uses the "increase list level" or "decrease list level" buttons, the bullets change accordingly. The tab-key has the same effect, if used in the right way.

    Now, the big question: How can I get this behavior for any text box? When I manually (or by macro) set
    textrange.Paragraphs(i).ParagraphFormat.Bullet.Character, this destroys the behavior, even in previously "automatic" text boxes. Very annoying.

    Do you have any idea how I can set achieve this list level behavior for text boxes of my choice?

    It might already help if you can point to what this behavior is called, or how the list level bullet pattern is determined in the first place.

    All help is welcome!

    So far this is my workaround, but it breaks the automatic behavior.

    [vba] With MyTextRange
    For i = 1 To .Paragraphs.Count
    .Paragraphs(i).ParagraphFormat.Bullet.RelativeSize = 1
    Select Case .Paragraphs(i).IndentLevel
    Case 1
    .Paragraphs(i).ParagraphFormat.Bullet.Character = 110
    .Paragraphs(i).ParagraphFormat.Bullet.Type = ppBulletNone
    'nothing
    Case 2
    .Paragraphs(i).ParagraphFormat.Bullet.Type = 1
    .Paragraphs(i).ParagraphFormat.Bullet.Type = ppBulletUnnumbered
    .Paragraphs(i).ParagraphFormat.Bullet.Character = 110
    .Paragraphs(i).ParagraphFormat.Bullet.Font.Name = "Wingdings"
    'square
    Case Else
    'dash
    .Paragraphs(i).ParagraphFormat.Bullet.Type = 1
    .Paragraphs(i).ParagraphFormat.Bullet.Type = ppBulletUnnumbered
    .Paragraphs(i).ParagraphFormat.Bullet.Character = 8211
    .Paragraphs(i).ParagraphFormat.Bullet.Font.Name = "Arial"
    End Select
    Debug.Print .Paragraphs(i).ParagraphFormat.Bullet.Character
    Debug.Print .Paragraphs(i).ParagraphFormat.Bullet.Font.Name
    Next
    End With
    [/vba]
    Last edited by zxmon21; 03-10-2012 at 03:18 PM.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    If you have a template that does that AS DEFAULT I would love to see it.

    I would have said it was impossible but I'd like to be proved wrong!

    john ATSIGN pptalchemy.co.uk
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Regular
    Joined
    Feb 2012
    Posts
    7
    Location
    Hi John,
    I emailed you a sample slide with one "automatic bulleting" and one "broken" text box. Let me know if you can tell what causes the different behavior, I'm definitely in way beyond my VBA-skills here

    Have a nice Sunday afternoon,

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Thanks. I can't instantly see how that was done (I thought you meant the default text box had those properties)

    I can have a better look next week. In the meantime I would suggest you play with using TextFrame2 if you are not already doing that.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Regular
    Joined
    Feb 2012
    Posts
    7
    Location
    Hi John,
    I did some further investigation, and here's what I found.

    I took a text box with "automatic" behavior and compared the XML with a textbox with broken behavior. It turns out that there's only a tiny difference in the XML. Who knows, maybe this will help someone point me to the right VBA to set the broken textbox back to automatic behavior. Here's the diff

    In the automatic text box
    [VBA]
    <a>
    <aPr lvl="1"/>
    <a:r>
    <a:rPr lang="en-US" dirty="0" smtClean="0"/>
    <a:t>Level 1</a:t>
    </a:r>
    </a>
    [/VBA]

    In the broken text box
    [VBA]
    <a>
    <aPr lvl="1">
    <a:buSzPct val="100000"/>
    <a:buFont typeface="Wingdings"/>
    <a:buChar char="n"/>
    </aPr>
    <a:r>
    <a:rPr lang="en-US" dirty="0" smtClean="0"/>
    <a:t>Level 1</a:t>
    </a:r>
    </a>
    [/VBA]

    Now the question is: how do I get VBA to bring me back to the "auto" behavior?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •