Access/VBA Library


Gets the current slides and duplicates it for every element in the Content parameter and adds the content of the element at the current shape.

This function is usefull for creating slides when the content contains more text than current shape can hold but you want to view the content on the same format.


PopulateText( Content )
Name Type Description
Content Variant Required. An Array containing the text to populate.
Public Sub PopulateText(Content)

    Dim Index As Long

    If ActiveShape Is Nothing Then Exit Sub
    If Not IsArray(Content) Then Exit Sub
    If UBound(Content) = -1 Then Exit Sub

    For Index = UBound(Content) To LBound(Content) + 1 Step -1
        ActiveShape.TextFrame.TextRange.Text = Content(Index)
    Next Index
    ActiveShape.TextFrame.TextRange.Text = Content(LBound(Content))
End Sub



  • There should be one shape active when executing this function.
  ' Populate Lorum Ipsum over multiple slides
  Content = Array("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ",
                  "Aenean commodo ligula eget dolor.",
                  "Aenean massa. ",
                  "Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. ",
                  "Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.")

  Call PopulateText(Content)