Microsoft Excel Webinar

Results 1 to 6 of 6

Thread: How to make text to follow an arc ?

  1. #1

    How to make text to follow an arc ?

    Dear all,

    I have a hobby project constructing a pedigree fan chart using PowerPoint VBA.

    I have managed to make a six-generation-fan by using the ShapePie object (see the attached picture). Every sector is one Pie object. I have also been able to align Text Boxes to each sector, or rather to the four-sided polygon generated when the inner pie sector is on the top of the outer one (the picture explains it much better). Each polygon is intended to contain one ancestor record; currently it holds the name of the TextBox.

    However, closer to the centre I would like to make the text to curve to follow the arc of the sector (or the polygon).

    Question 1): what would be the best way to do this by using VBA?
    The Text Effect / Transform / Follow path seems a clumsy approach, and I am not sure how then to control the arc using the VBA.

    2) How can I change the font size within one TextBox using VBA? E.g. the name with a bigger font and then the birth date with smaller.

    If I add the name first with a font size 9 and use .InsertAfter for the birth date and then e.g., .TextFrame2.TextRange.Font.Size = 7, the font size for the whole box changes.

    Thanks in advance for the help


  2. #2
    I have no idea about your question but I should admit that I am impressed. That's a great piece of work. And I am sorry for occupying space here instead of puting forth a new approach...

  3. #3

    How to make text to follow an arc -cont'd

    Capungo, thanks for the compliment.


    This picture shows what I was able to accomplish manually. It is some time ago, but I believe I used Text Effect -Follow Path, but it was rather laborius to adjust the text with different amount of text for each polygon.

    If this could be done by using VBA code, it'd help a lot !


    The other question I was able to solve by using the " .Paragraphs(1).Font.Size = " function.

  4. #4

    Solved (I think): Text following an arc



    I was able to solve this (at least for my needs) by creating a textbox for each letter of the text to be rotated (see attached picture), and then rotating each with certain angle to follow the arc. This was a bit complicated, the code runs slow and using a fixed size font is preferred, but it works, also for any length of the arc and for multiple lines.

    I saw a discussion in the net on using an API CreateFontIndirect in Visual Basic ( , but this seemed even more complicated and I was not sure if it applied to PowerPoint.


  5. #5
    That's the only way I know (we have an AddIn that calculates the code angles for you but it's not a freebie)
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials

  6. #6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts