Consulting

Results 1 to 3 of 3

Thread: INSERTING A PREFORMATTED BULLETED TEXT BOX

  1. #1
    VBAX Contributor
    Joined
    Dec 2018
    Location
    South London
    Posts
    115
    Location

    INSERTING A PREFORMATTED BULLETED TEXT BOX

    Hi John, sorry I've kept you so busy. This is the last one , but I'm sure thousands of people would find this useful.

    I'd like to have a button that when clicked inserts a Text box on the slide with 3 levels of bullets, I have this so far:


    Sub NewTextBox()
    Dim I As Integer
    
    [????]
    
    I = 1
    For I = 1 To .TextRange2.Paragraphs.Count
    With .TextRange2.Paragraphs(I)
    Select Case .ParagraphFormat.IndentLevel
    Case Is = 1
    .ParagraphFormat.Alignment = ppAlignLeft
    'NOTE The FirstLineIndent is essentially how far Behind the
    'left indent the bullet appears. Usually it stays constant
    ' hard to understand at first
    .ParagraphFormat.FirstLineIndent = -15
    .ParagraphFormat.LeftIndent = 15
    With .ParagraphFormat.Bullet
    .Visible = msoCTrue
    With .Font
    .Name = "Wingdings"
    .Fill.ForeColor.RGB = RGB(219, 0, 17)
    End With
    .Character = 167
    End With
    Case Is = 2
    .ParagraphFormat.Alignment = ppAlignLeft
    .ParagraphFormat.FirstLineIndent = -15
    .ParagraphFormat.LeftIndent = 30
    With .ParagraphFormat.Bullet
    .Visible = msoCTrue
    With .Font
    .Name = "Arial"
    .Fill.ForeColor.RGB = RGB(219, 0, 17)
    End With
    .Character = 8211
    End With
    Case Is = 3
    .ParagraphFormat.Alignment = ppAlignLeft
    .ParagraphFormat.FirstLineIndent = -15
    .ParagraphFormat.LeftIndent = 45
    With .ParagraphFormat.Bullet
    .Visible = msoCTrue
    With .Font
    .Name = "Wingdings"
    .Fill.ForeColor.RGB = RGB(219, 0, 17)
    End With
    .Character = 167
    .RelativeSize = 0.9
    End With
    End Select
    End With
    Next I
    End If
    End With
    End Sub
    THANK YOU
    Last edited by Paul_Hossler; 01-02-2019 at 04:08 PM. Reason: Added CODE Tags - use the [#] icon

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    you can only preformat Placeholders. With a normal TextBox you can only format existing text.

    We often program TextBoxes and tables with programmed levels for big customers but the solution is very complicated and involves hacking into the increase/decrease level command. It would be hard to explain and in any case I don'rt want to share the solution as we charge mega bucks for it!
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Contributor
    Joined
    Dec 2018
    Location
    South London
    Posts
    115
    Location

    Bulleted text

    Hi John, totally understand!! Would be crazy to release secrets. Thanks for all your help Forever grateful. Have a great 2019

Tags for this Thread

Posting Permissions

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