Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8221981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:07:13+00:00 2026-06-07T14:07:13+00:00

I am trying to set the width of a textbox as undefined so it

  • 0

I am trying to set the width of a textbox as undefined so it will behave as autofit
in powerPoint 2007 I use the following:

shape = slide.Shapes.AddTextbox(Office.MsoTextOrientation.msoTextOrientationHorizontal, left, top, 0f, 0f);

And it look fine on the slide in pp-2007
But when I open the presentation in pp-2010 I get all the characters of the text wraped under each other.
This is maybe to be expected when you set the width as 0 but it looks fine in pp-2007.
I also use the following but it dose not help:

shape.AutoSize = PpAutoSize.ppAutoSizeShapeToFitText;

I tried it also like this:

shape = slide.Shapes.AddTextbox(Office.MsoTextOrientation.msoTextOrientationHorizontal, left, top, float.NaN, 0f);

But that only gives me a very long textbox

Can anyone help me on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:07:15+00:00Added an answer on June 7, 2026 at 2:07 pm

    You should disable word wrap then PowerPoint will size the text box as required:

    shape.TextFrame.AutoSize = ppAutoSizeShapeToFitText
    shape.TextFrame.WordWrap = msoFalse
    shape.TextFrame.TextRange.Text = "Text"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use JavaScript to set an elements width relative to their
I am having a problem trying to set the width of a textbox. I
I'm trying to set together a simple TextBox with some watermark text in the
I'm trying to set the width & height property of an image element i've
I'm trying to get the width of a div container to set another css
I'm trying to set up a messages view with asp.net mvc that will display
I have a textbox, and I'm trying to print to it with the following
I am trying to set a TextBox control's Text property to the value of
I am trying to set up styles in an external DLL that will be
I'm trying to drop a file into a textbox in order to set the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.