Solved

Placing Title Textbox

Posted on 2006-11-09
3
173 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

757 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

17 Experts available now in Live!

Get 1:1 Help Now