Solved

Placing Title Textbox

Posted on 2006-11-09
3
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

624 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