Why this macro not working in MS Word 2016

Discussion, questions and support.
Post Reply
Fazlul
Posts: 6
Joined: Jun 23rd, ’21, 11:39

Post by Fazlul » Jun 24th, ’21, 09:36

Hi there

I am using this macro command in MS Word 2016 to automate find and replace option, but it is not working properly. It is only returning j letter:

Send, ^h^p{Tab} !a{Right}{Enter}{Escape}^j

F5 is my shortcut , ^h is a Word shortcut, ^p is text input.

Thanks
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jun 24th, ’21, 11:27

If I understand correctly, the ^p is literal so ^ it needs to be enclosed in braces.

Code: Select all

Send, ^h{^}p{Tab} !a{Right}{Enter}{Escape}^j
If still not working, you may need to introduce short pauses between the steps.

Code: Select all

Send, ^h
Sleep, 20
;etc
Fazlul
Posts: 6
Joined: Jun 23rd, ’21, 11:39

Post by Fazlul » Jun 25th, ’21, 18:57

Tom wrote: Jun 24th, ’21, 11:27 If I understand correctly, the ^p is literal so ^ it needs to be enclosed in braces.

Code: Select all

Send, ^h{^}p{Tab} !a{Right}{Enter}{Escape}^j
If still not working, you may need to introduce short pauses between the steps.

Code: Select all

Send, ^h
Sleep, 20
;etc
Thank you.
The last one is working
Post Reply