Forestq

Active Member
Joined
May 9, 2010
Messages
482
Hi,

I have added Textbox into PPT and I want to put there a text with few line - each should be marked by bullet (dot or circle) or by number (like 1, 2).
Example:

1. Some long text
2. Other text etc....

How can I do it?
Code:
activeSlide.Shapes.AddTextbox msoTextOrientationHorizontal, Left:=0, Top:=60, Width:=500, Height:=50
With activeSlide.Shapes(1).TextFrame
    .TextRange.Text = ""
    .TextRange.Font.Color = RGB(0, 32, 96)
    .TextRange.Font.Size = 12
    .TextRange.Font.Name = "Arial (Body)"
    .WordWrap = msoCTrue
    .TextRange.Font.Underline = msoTrue
End With
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Try bit at bottom of this code:
Code:
Sub PlayWithTextBox()

    ActiveWindow.Selection.SlideRange.Shapes.AddTextbox(msoTextOrientationHorizontal, Left:=0, Top:=60, Width:=500, Height:=50).Select
    With ActiveWindow.Selection.SlideRange.Shapes(1)
        With .TextFrame.TextRange.Font
            .Name = "Arial"
            .Size = 12
            .Italic = True
            .Bold = True
            .Shadow = True
            .Color = rgbGreen
            .Underline = True
        End With
        .TextFrame.VerticalAnchor = msoAnchorMiddle
        .TextFrame.HorizontalAnchor = msoAnchorCenter
        .TextFrame.TextRange.Paragraphs.ParagraphFormat.Alignment = ppAlignLeft

        .Fill.ForeColor.RGB = rgbLightBlue
        .Fill.Transparency = 0
        
        .Line.DashStyle = 1
        .Line.Style = 1
        .Line.ForeColor.RGB = rgbRed
        .Line.Weight = 1
        .TextFrame.TextRange.Text = "First Line" & vbLf & "Second Line" & vbLf & "Third Line"
        
        With .TextFrame.TextRange.ParagraphFormat.Bullet
            .Visible = True
            .RelativeSize = 1.25
            With .Font
                .Color = RGB(255, 0, 255)
                .Name = "Symbol"
            End With
            .Character = 183
        End With
        
    End With


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,284
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top