Fit to Path in VSTA

Hello all, I have a bit of a brain racker, at least for myself.  Essentially, I have 2 circles, and then a circle in between them that acts as a guideline for the text. However, when I call  upon "Text.Text.FitToPath" my text alligns to the top portion of the text.

 I thought at first I had a setting that was incorrect, so I made a little test for myself with the following code

{

Private Sub CommandButton1_Click()
Dim circ As Shape
Set circ = ActiveShape
ActiveDocument.AddToSelection ActivePage.Shapes.All
ActiveDocument.RemoveFromSelection circ
Dim testtext As Shape
Set testtext = ActiveLayer.CreateArtisticText(0, 0, "Hello")
testtext.Text.FitToPath circ

End Sub

}

However, this produced the correct result, which is

There is no differences in the code that fits it to the path, but yet I still end up with these major differences.

  • Not sure about VSTA but...

    Lets do this...

    Userform1

    1. Textbox1
    2. CommandButton1

    CommandButton1:

    ActiveDocument.BeginCommandGroup "Text to Path Top"

    Optimization = True

    Set stext = ActiveLayer.CreateArtisticText(ActiveLayer.Page.CenterX, 2.5, TextBox1.Text, cdrLanguageNone, cdrCharSetMixed, , 24)
      stext.Text.Story.CharSpacing = 5
      stext.Text.Story.WordSpacing = 115
      stext.OrderToFront

    Set sEllipse = ActiveLayer.CreateEllipse2(5.5, 4, 2, 2)
      sEllipse.Outline.SetProperties Color:=CreateRGBColor(255, 20, 60)
      sEllipse.Outline.SetProperties 0.04, OutlineStyles(5), DashDotLength:=0#

    stext.Text.FitToPath sEllipse
    stext.Effects(1).TextOnPath.DistanceFromPath = 0.1
    stext.RemoveFromSelection

    ActiveDocument.EndCommandGroup

    Optimization = False
    ActiveWindow.Refresh
    Application.Refresh

    • Just type something in the text box and click the command button. You can mess w/the distance from path...

      It's not exactly what you're looking for but something to play with.
      • Sorry I forgot to close this.. it's a bit older. I found the problem, because it was being fit to path twice, it was coming up with a bug that was causing the registration point to be the old location of the deleted line. I did some of that improvising you talked about and got it to work a few weeks ago.