I run MS office 365 and nvda (NV access) on windows 10 ultimate 64 bit. I wish to write a MS word macro to activate the NVDA continuous read function. NVDA continuous read function is manually activated by simultaneously pressing the insert and down arrow keys. The insert key may also be substituted with the caps lock key to achieve the sameend. NVDA is a freeware screen reader written in python. I have tried send keys without success because I cant find code that will simulate simultaneous pressing of either the insert or caps lock keys with other keys. Can someone please supply me with the necessary vb code.
Asked
Active
Viewed 169 times
0
-
1VBA and VB.Net are not the same language. If you are wanting to write a Word macro, you should edit your question to use the vba tag instead vb.net. You should also remove the macros tag as that is not for MS Office macros. – Blackwood Aug 19 '17 at 13:21
1 Answers
0
Since you've tagged this with vb.net I assume you're using VSTO.
In order to simulate input using a wider variety of keys than what SendKeys
allows you can use my InputHelper
library, which is a wrapper for the native SendInput()
function.
My library makes input simulation fairly simple:
InputHelper.Keyboard.SetKeyState(Keys.Insert, True) 'Push down INSERT.
InputHelper.Keyboard.PressKey(Keys.Down) 'Press the DOWN arrow key.
InputHelper.Keyboard.SetKeyState(Keys.Insert, False) 'Release INSERT.

Visual Vincent
- 18,045
- 5
- 28
- 75