How to Assign Artistic Text to Variable

Hi, I have a simple document that has named Artistic Text (i.e. design in screen shot below).  In VBA I would like to set my variable design equal to the text/string of named Artistic Text.  For example, in this case the variable should get assigned  "Design 3":

design = p.Shapes.FindShape("design")

design = design 3 

I have tried various different ways and looked through previous questions, yet I still cannot get this to work.  Does anyone know how to do this?

Sub designauto()

Dim design As String


design = p.Shapes.FindShape("design")

Parents
No Data
Reply
  • I'm not sure that I understand what you are trying to do.

    Do you want to find an Artistic Text shape that is named, "design", and then get from that shape the string of text?

    Sub designauto()
    
    Dim s As Shape
    Dim strFromText As String
    
        Set s = ActivePage.Shapes.FindShape("design")
        strFromText = s.Text.Story
        MsgBox "Acquired Text: " & strFromText
    End Sub
    
Children