Solved

Placing Title Textbox

Posted on 2006-11-09
3
176 Views
Last Modified: 2010-04-30
Driving me mad...

I'm using this code to place a new title in a slide. Can not work out how to specify where it is placed or its size though...???

With PPSlide.Shapes
        If .HasTitle Then
          .Title.Delete
        End If
        With .AddTitle.TextFrame.TextRange
          .Text = Cells(Row + 1, Column + 1).Value
          .Font.Color.RGB = RGB(Red:=51, Green:=51, Blue:=153)
        End With
      End With
0
Comment
Question by:UINVDJM
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
mvidas earned 500 total points
ID: 17906619
Hi Darren,

(untested aside from checking properties)
What about something like

      With PPSlide.Shapes
        If .HasTitle Then
          .Title.Delete
        End If
        With .AddTitle
          .Left = 10
          .Top = 10
          .Height = 20
          .Width = 20
          With .TextFrame.TextRange
            .Text = Cells(Row + 1, Column + 1).value
            .Font.Color.RGB = RGB(Red:=51, Green:=51, Blue:=153)
          End With
      End With

I noticed the TextFrame also has an .autosize method

Matt
0
 
LVL 11

Author Comment

by:UINVDJM
ID: 17906748
Ah, I was trying to add .Left etc in the wrong place.

Thank you again!
0
 
LVL 35

Expert Comment

by:mvidas
ID: 17906785
Glad to help! The .TextFrame has .marginXXXX properties as well to make it a little nicer, and the .textrange has .boundXXXX properties as well, but that last one doesn't seem to do much more than the .margins

Again, let me know if you need anything else (and adding it to this Q or one of the others would be fine with me)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

860 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