2 fonts in Chart title in E2007

J

J Streger

We are tranferring code from 2003 to 2007 and noticed a change in how VBA
reads the following line:

ActiveChart.ChartTitle.Characters(5,2).Font.Color = vbred

IN 2003, it reads it correctly coloring letters 5 & 6 red.
in 2007, it colors the whole Chart title red.

It seems that regardless of the start and length I pass into the characters
function, the formatting occurs to the entire chart title, not just the
characters I wanted.

Even recording the VBA in 2007 yields no help as it cannot record the
partial font change, even though the GUI allows it. IN 2003 you can record
the partial font change.

Any ideas on what's happening here?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003
 
G

Gary Keramidas

pasted the code in the immediate window and it turned the entire title font color to
red.
 
A

Andy Pope

Hi,

It's a known bug and as Gary points out this has been fixed for 2010.
a work around for 2007 would be to use a textbox. So code would be something
like,

ActiveChart.Shapes("Textbox 1").TextFrame.Characters(5,2).Font.Color = vbred

Cheers
Andy
 
P

Peter T

Ah, looks like one of those newly introduced into 2007 SP2 bugs. In my SP2
it works as everyone else says, but tested again in my SP1 and it works
fine!

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top