Autofit text to placeholder using vbscript

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am scripting some features to powerpoint and I can not figure out how to
set the autofit text to placeholder in script.

Can anyone help?
 
I am scripting some features to powerpoint and I can not figure out how to
set the autofit text to placeholder in script.

What have you got so far?

And have you tried recording a macro in PPT while you make the changes
manually? (only works in 2003 and previous)
 
Steve,

I was hoping there was a way to call to the feature that autofits text to
placeholder...but I have at this time counted the number of paragraph marks
and set the font size to accomodate the greater amount of content.

Do you see an more elegant solution?

Paddy
 
Steve,

Yes! I did try recording a macro and it would not record the action taken.
I think John is right this is not easily accessible in the version I am
running.
 
John,

Thanks! I have a decent work around for now and I will look into whether I
can set the registry value.

Paddy
 
Yes! I did try recording a macro and it would not record the action
taken.
I think John is right this is not easily accessible in the version I am
running.

<bending_over>
OK. You're awarded one swift kick at the target presented here.
</bending_over>

My mistake ... I was thinking of autosizing the shape to the text, not the
opposite.

If you're scripting PPT from an external app and you're starting PPT up
yourself, you could change the AutoFit settings by making changes to the
registry. Look at what happens in
HKCU\Software\Microsoft\Office\X.X\PowerPoint\Options as you change the
AutoFit settings manually then refresh the Regedit window.

X.X = 11.0 in this case (2003) but will vary with other versions.

If you have to work within PPT/VBA, this won't work. PPT loads these
settings at startup, so changes after that won't have any effect. You'll
probably have to use SendKeys to do the deed dirtily.


 
Back
Top