I'm trying to create a fairly simple macro in Word 2010 using Visual Basic. All it needs to do is press Alt+F7 to select the closest spelling error, then press Enter to choose the first spelling suggestion, then press Shift+F5 to return to the previous edit point. I tried this:
SendKeys "%{F7}"
SendKeys "~"
SendKeys "+{F5}"
but the context menu that pops up after %{F7} disappears immediately so it doesn't receive the Enter key press. Instead, the selected text gets replaced with a line break. Any suggestions? I perform this sequence of key presses a lot when typing, so it would great if I could automate it.