VBA KeyPress event

  • Thread starter Thread starter Guest
  • Start date Start date
It seems to me that the KeyPress event is fired only if typing to a textbox
on a form, is it correct?
And if yes, is there an equivalent event or a way around it such that I can
read and process text typed to a slide in normal (edit) view?
This has been prompted by somebody asking this group some time ago how to
type diacritic characters into PP slides.

JanAdam
 
Thanks Glenna.

I know about Insert, Symbol of course. It is very combersome though.

The idea was to write a code that would read the typed input and, e.g., if
one types "\o" it would execute SendKeys ChrW(248). I just do not know how
to read from the keyboard in real time, when typing to a text box or a shape
on a slide in normal (edit) view. KeyPress does exactly what I want but it
seems to be limited to reading the keyboard when typing to a text box on a
form only. Or I am missing something?

JanAdam
 
JanAdam,

Draw a text box control on the page (not on a userform)
and add this code to it

Private Sub TextBox1_Change()
MsgBox TextBox1.Text
End Sub

Return the string on every keystroke into text box.

Brian Reilly, PowerPoint MVP
 
Thanks Brian, will try. JanAdam


JanAdam,

Draw a text box control on the page (not on a userform)
and add this code to it

Private Sub TextBox1_Change()
MsgBox TextBox1.Text
End Sub

Return the string on every keystroke into text box.

Brian Reilly, PowerPoint MVP
 
Back
Top