Log in

View Full Version : Powerpoint autocomplete text box from user form.



dedmonds
09-05-2011, 08:31 AM
Hello,
I am creating a user form to automatically enter a candidates name on a certificate from the text I enter into a user form.
Here is what I have so far, can anyone tell me why it won't work?
[code]Private Sub btncreate_Click()
ActivePresentation.Slides.Shapes("Group 81") = txtname.Value
Unload Me
End Sub[\code]

thanks

Dave

John Wilson
09-05-2011, 08:40 AM
Assuming that shape exists and it can contain text

ActivePresentation.Slides(1).Shapes("Group 81").TextFrame.TextRange = txtname.Value
However from the name it's a grouped shape so you might find that the text is added to each member of the group

You might consider

ActivePresentation.Slides(1).Shapes("Group 81").GroupItems(1).TextFrame.TextRange = txtname.Value

dedmonds
09-06-2011, 03:36 AM
Many thanks for your help.

regards

Dave