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.

Parents
  • 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

Reply Children