View Single Post
 
Old 02-20-2012, 12:39 PM
viuf viuf is offline Windows XP Office 2007
Novice
 
Join Date: Feb 2012
Posts: 10
viuf is on a distinguished road
Default autofit text to shape (msoShapeRectangle)

Hi...

I'm trying to autofit som text in a shape (a Rectangle), but I can only find autofit in ordinary textboxes. Can anybody help?

Thanks in advance

Code:
Set oshp = ActivePresentation.Slides(1).Shapes _
.addShape(msoShapeRectangle, left, top, width, height) ' left, top, width, height
    With oshp
        .Name = "Kategori" & countTwo
    End With
    With oshp.TextFrame.TextRange
        .Text = categories(countTwo)
    End With
    
    With oshp.Fill
        .ForeColor.RGB = RGB(200, 200, 200)
        .Visible = True
    End With
Reply With Quote