VBA Express Forum  




Go Back   VBA Express Forum > VBA Code & Other Help > PowerPoint Help
     Feedback     
Register FAQ Members Arcade Knowledge Base Training Articles Consulting

Reply
 
Thread Tools Display Modes
Old 01-07-2012, 09:31 AM   #1
JariV

 
Joined: Dec 2011
Posts: 8
Kb Entries: 0
Articles: 0
How to make text to follow an arc ?

PedigreeFanChart_project.jpg
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

Cheers,
JariV

Local Time: 01:35 AM
Local Date: 05-19-2013
Location:

 
Reply With Quote Top
Old 01-09-2012, 12:33 PM   #2
Capungo

 
Joined: Apr 2011
Posts: 21
Kb Entries: 0
Articles: 0
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...

Local Time: 02:35 PM
Local Date: 05-18-2013
Location:

 
Reply With Quote Top
Old 01-10-2012, 12:25 AM   #3
JariV

 
Joined: Dec 2011
Posts: 8
Kb Entries: 0
Articles: 0
How to make text to follow an arc -cont'd

Capungo, thanks for the compliment.

Name:  Fan_example2.jpg
Views: 27
Size:  136.6 KB

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 !


Regards,
JariV

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

Local Time: 01:35 AM
Local Date: 05-19-2013
Location:

 
Reply With Quote Top
Old 02-11-2012, 06:04 AM   #4
JariV

 
Joined: Dec 2011
Posts: 8
Kb Entries: 0
Articles: 0
Solved (I think): Text following an arc

Rotated_text_sample.jpg

FYI,

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 (http://www.nirsoft.net/vb/rotated.html) , but this seemed even more complicated and I was not sure if it applied to PowerPoint.

Cheers,
-JariV

Local Time: 01:35 AM
Local Date: 05-19-2013
Location:

 
Reply With Quote Top
Old 02-12-2012, 08:44 AM   #5
John Wilson

 
Joined: Feb 2007
Posts: 833
Kb Entries: 1
Articles: 0
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
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html

Local Time: 11:35 PM
Local Date: 05-18-2013
Location:

 
Reply With Quote Top
Old 03-26-2012, 09:28 AM   #6
delete123

 
Joined: Mar 2012
Posts: 9
Kb Entries: 0
Articles: 0
what is that?

Local Time: 02:35 PM
Local Date: 05-18-2013
Location:

 
Reply With Quote Top
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 03:35 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2012 VBA Express