VBA Powerpoint 2003/2007 - Align text inside a textbox/Shape

Posted on 2009-12-29
Last Modified: 2013-11-25
Got this code:
Dim s As Slide
Set s = ActivePresentation.Slides.Add(1, ppLayoutBlank)
Dim t As Shape
Set t = s.Shapes.AddTextbox(msoTextOrientationHorizontal, 10, 10, 100, 100)

t.TextFrame.TextRange.Text = "asd"

Now i want to align the text inside the textbox to the left (default is center).
Any ideas, i am totally lost.
Question by:Skullkid
    1 Comment
    LVL 1

    Accepted Solution

    Found the solution:
    t.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignLeft

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Setting the Scene PowerPoint is a creative tool in the right hands but it also includes a much underutilised programming dimension. In this beginner level article, we're going to show you some of some key elements of programming PowerPoint using th…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    This video teaches viewers how to add simple and professional themes to their slides.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now