Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Controlling Hanging indents etc (VBA/Powerpoint/2000)

    I can't seem to be able to find a way of controlling the size of the indent for bullets using VBA. Basically i'm trying to trying to create bullet styles for users to apply in a usercreated textbox.

    Many thanks

    Thom

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Controlling Hanging indents etc (VBA/Powerpoint/2000)

    Here is an example:

    Dim i As Integer
    For i = 1 To 5
    With ActivePresentation.SlideMaster.TextStyles(ppBodySt yle).Ruler.Levels.Item(i)
    .FirstMargin = 72 * i
    .LeftMargin = 72 * i + 36
    End With
    Next i

    There are 5 levels; each has a FirstMargin (the bullet position) and a LeftMargin (where the text begins). They are measured in points (1 inch = 72 points).

  4. #3
    Star Lounger
    Join Date
    Nov 2005
    Location
    London, Gtr London, United Kingdom
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Controlling Hanging indents etc (VBA/Powerpoint/2000)

    Thanks for this Hans.

    I managed to get it to work on a plain text box without affecting the master slide:-

    With ActiveWindow.Selection.ShapeRange.TextFrame.Ruler. Levels(i) etc. etc.

    but using the same logic, I'm unable to do the same with with the bullet/font type for each level.

  5. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Controlling Hanging indents etc (VBA/Powerpoint/2000)

    Look up Bullet (surprise, surprise) in the PowerPoint VBA help. Example:

    With ActiveWindow.Selection.ShapeRange.TextFrame. _
    TextRange.Paragraphs(2).ParagraphFormat.Bullet
    .Visible = True
    .RelativeSize = 1.25
    .Character = 75
    With .Font
    .Color.RGB = vbGreen
    .Name = "Wingdings"
    End With
    End With

    This sets the bullet for the 2nd paragraph.

Posting Permissions

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