Exposian
05-05-2015, 07:16 AM
Hi all,
I have a question regarding columns in text box in PowerPoint.
I am trying to add columns into the code below but I am not sure where to add it? Can anyone kindly advise me? It would be much appreciated!
Regards,
Philippe
Trying to add this:
.Column.Spacing = 15
.Column.Number = 2
To this:
Sub PlainText()
Dim o As Shape
On Error GoTo Catch
Set o = ActiveWindow.Selection.ShapeRange(1)
If Not o Is Nothing Then
With o
.Left = 31.125
.Top = 134.5
.Height = 60
.Width = 381.375
.Fill.Visible = msoFalse
.Line.Visible = msoFalse
With .TextFrame
.WordWrap = msoTrue
.AutoSize = ppAutoSizeShapeToFitText
.MarginLeft = 0
.MarginRight = 0
.MarginTop = 0
.MarginBottom = 0
.VerticalAnchor = msoAnchorTop
.HorizontalAnchor = msoAnchorNone
With .TextRange
If .Text = "" Then
.Text = "<Put your text here>"
.Select
End If
.ParagraphFormat.SpaceWithin = 1.1
.Paragraphs.ParagraphFormat.Alignment = ppAlignLeft
With .Font
.Name = CG_DEFAULT_FONT
.Size = 10
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoFalse
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
End With
End With
End With
End With
End If
Exit Sub
Catch:
If Err.Number = -2147188160 Then MsgBox CG_NOTHING_SELECTED
End Sub
I have a question regarding columns in text box in PowerPoint.
I am trying to add columns into the code below but I am not sure where to add it? Can anyone kindly advise me? It would be much appreciated!
Regards,
Philippe
Trying to add this:
.Column.Spacing = 15
.Column.Number = 2
To this:
Sub PlainText()
Dim o As Shape
On Error GoTo Catch
Set o = ActiveWindow.Selection.ShapeRange(1)
If Not o Is Nothing Then
With o
.Left = 31.125
.Top = 134.5
.Height = 60
.Width = 381.375
.Fill.Visible = msoFalse
.Line.Visible = msoFalse
With .TextFrame
.WordWrap = msoTrue
.AutoSize = ppAutoSizeShapeToFitText
.MarginLeft = 0
.MarginRight = 0
.MarginTop = 0
.MarginBottom = 0
.VerticalAnchor = msoAnchorTop
.HorizontalAnchor = msoAnchorNone
With .TextRange
If .Text = "" Then
.Text = "<Put your text here>"
.Select
End If
.ParagraphFormat.SpaceWithin = 1.1
.Paragraphs.ParagraphFormat.Alignment = ppAlignLeft
With .Font
.Name = CG_DEFAULT_FONT
.Size = 10
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoFalse
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
End With
End With
End With
End With
End If
Exit Sub
Catch:
If Err.Number = -2147188160 Then MsgBox CG_NOTHING_SELECTED
End Sub