J
Jakob Lithner
I want to add a TextFrame to a PowerPoint slide and make sure there are no
text wraps. Instead the text size should decrease if necessary.
I tried the following code:
shape =
slide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, 0,
0, 1280, 600);
shape.Name = "MyName1";
textFrame = shape.TextFrame;
textFrame.AutoSize = PpAutoSize.ppAutoSizeMixed;
The last line throws an ArgumentException:
"Input parameters are outside the interval." (My translation from swedish)
It works fine to set the other two enum values:
PpAutoSize.ppAutoSizeShapeToFitText
PpAutoSize.ppAutoSizeNone
I searched the internet and found out that many people have encountered the
same kind of problem, but just in PowerPoint 2007. Is there some kind of bug
here? Has the enum switched values that are no longer acceptable, or the
other way around?
Any workaround?
text wraps. Instead the text size should decrease if necessary.
I tried the following code:
shape =
slide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, 0,
0, 1280, 600);
shape.Name = "MyName1";
textFrame = shape.TextFrame;
textFrame.AutoSize = PpAutoSize.ppAutoSizeMixed;
The last line throws an ArgumentException:
"Input parameters are outside the interval." (My translation from swedish)
It works fine to set the other two enum values:
PpAutoSize.ppAutoSizeShapeToFitText
PpAutoSize.ppAutoSizeNone
I searched the internet and found out that many people have encountered the
same kind of problem, but just in PowerPoint 2007. Is there some kind of bug
here? Has the enum switched values that are no longer acceptable, or the
other way around?
Any workaround?