Word 2016 Using Sendkeys in Autoopen
I would like to send a string to a word document when it opens.
But, sendkeys does not seem to work.
Here is my code.
Selection.MoveDown Unit:=wdLine, Count:=10
Selection.MoveUp Unit:=wdLine, Count:=10
SendKeys "Hi Mom"
This should send "Hi Mom" to the newly open document, but it doesn't do it.
What will make this work?
Does it work if you execute Selection.TypeText "Hi, Mom" instead of SendKeys "Hi Mom"?
Sign in to comment
Actually, I need to send a ctrl+key sequence.
But, I thought if I could get the text going, then I could try the ctrl+key.
Let me try that.
Yes, that works.
Searching docs now to see if I can send a Ctrl+key sequence.