Consulting

Results 1 to 7 of 7

Thread: Autofit Text to Placeholder

  1. #1
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location

    Autofit Text to Placeholder

    Can any one tell me the VBA to get to the 'Autofit Text to Placeholder'?

    If the text is too much for a placeholder, sometimes it will overflow, but PP2003 (XP SP2) put a little control called "Autofit Options" at the lower left, and I can shrink the text to automagically fit into the place holder.

    Recording a macro doesn't capture anything

    There are some AutoCorrect options that have "Autoformat As You Type" check boxes that deal with autofit, but I don't see how to use them.

    Any help appreciated

    Paul

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Hi Paul

    This setting is stored in the registry so you would have to write code to modify (not that simple in vba!) It apply to the application not to individual placeholders.

    Key is at (for 2003)
    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\PowerPoint\Options\AutoFitTextBody
    Last edited by Aussiebear; 04-28-2023 at 01:49 AM. Reason: Added code tags
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    Thanks, but I was trying to improve my "cleanup" macro so that any place holders that had over-flowing text would get "auto-fitted".

    I believe that your registry suggestion sounds like it would turn off the check box in autoformat options.

    I was trying to figure out how to call the "autofit" method (if any) to make the text fit.

    Did some Google-research and it seems like that's a Smart Tag. Sinking feeling that I won't be able to get to it.

    Paul

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    The reg key will turn it on or off (value 1 =on, 0=off). If you would like vba code to write to this key at your own risk you can email me , I don't want to post it publically because in the wrong hands ....

    john AT SIGN technologytrish.co.uk
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    John, thanks for the reply -- before I take my life in my hands and mess with the registry, will turning it on or off force any existing overflowing text to autofit?

    I did a quick PPT test with overflowing text, and went to Tools, Autocorrect Options, Autoformat as you type, and Cleared the Autofit checkboxes, exited, re-set then checks, exited.

    Did not force an autofit.

    Does the reg key force it to autofit existing overflow?

    Paul

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Paul

    Modifying the registry should do exactly the same as changing the options in powerpoint so I guess the answer is probably NO Existing overflow will not be resized.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    Darn

    Nothing is ever easy

    Thanks

    Paul

Posting Permissions

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