Link to home
Start Free TrialLog in
Avatar of Luis Diaz
Luis DiazFlag for Colombia

asked on

Powerpoint VBA: insert text zone + click on zone

Hello experts,

The following procedure allows me to add date stamp on specific text zone.
I would like to add the following requirement:
Finish the procedure with a click inside the text zone to continue with a note like this:

User generated image
Sub Insert_Date()
 Dim oSld As Slide
 Dim oSh As Shape
 On Error Resume Next ' add your own error handling
 Set oSld = ActiveWindow.View.Slide
 Set oTextRange = oSld.Shapes.AddTextbox(msoTextOrientationHorizontal, _
 600, 0, 400, 400).TextFrame.TextRange
 With oTextRange
 .Font.Color = RGB(255, 0, 0)
 .Text = "Update date: "
 .InsertDateTime ppDateTimeMMddyyhmmAMPM, True
 End With
End Sub

Open in new window


Thank you for your help.
ASKER CERTIFIED SOLUTION
Avatar of John Korchok
John Korchok
Flag of United States of America image

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
Avatar of Luis Diaz

ASKER

Tested and it works!

Thank you very much for your help.