AnsweredAssumed Answered

How to use a string variable to drive an annotation?

Question asked by Keaton Warn on Jul 16, 2019
Latest reply on Jul 17, 2019 by Keaton Warn

I've provided a snippet of my code below. Is there a way I can use a string variable for driving a drawing note's displayed text in line 16? I haven't seen anything helpful in the documentation - maybe I missed it.


dim swApp as Object

sub main()   
    Dim Part As Object
    Dim strUserNameF as string
    Dim boolstatus As Boolean
    Dim longstatus As Long, longwarnings As Long
    Dim myNote As Object
    Dim myAnnotation As Object
    Dim myTextFormat As Object
    Set Part = swApp.ActiveDoc
    strUserNameF = "Bob McMan"

    boolstatus = Part.ActivateSheet(vSName)
    Part.FONTBOLD True
    Part.FontPoints 75
    Set myNote = Part.InsertNote("<FONT color=0x000000ff><FONT size=75PTS style=B>strUserNameF")

    'Other code down here
End Sub


For example, I want the note on the drawing to say "Bob McMan" but I'm not sure how to make that variable value flow into line 16.