Link to home
Start Free TrialLog in
Avatar of BraveNewWorld
BraveNewWorld

asked on

Set Label.Caption in a PowerPoint Presentation

Hi and a good evening.
My Question :
How can I set a Label.Caption in a Powerpoint Presentation with a Visual Basic Program?
I have tried this:
Dim Lab1 As Label
Set Lab1 = ActivePresentation.Slides(1).Shapes(2).OLEFormat.Object
With Lab1
.Caption= Text1.Text
End With
Yes sure I have open before the Presentation!

But it doesn't work.

Thanks for answer.
Avatar of JohnMcCann
JohnMcCann

   With ActivePresentation.Slides(1).Shapes(1)
        .HasTextFrame = True
        .TextFrame.TextRange.Text = "Hello"
    End With
Avatar of BraveNewWorld

ASKER

Hi.
First thanks for your reply.
I mean an ActiveX Label from the Toolbox. Not a TextFrame.
The Presentation has no TextFrame. Only 4 Labels.This 4 Label Captions I want set over a Visual-Basic Program.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of JohnMcCann
JohnMcCann

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BraveNewWorld:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
Avatar of DanRollins
Moderator, my recommended disposition is:

    Accept JohnMcCann's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer