![]() |
#1
|
|||
|
|||
![]()
I develop Word add-ins for copyeditors and such. Many of my macros depend on being able to extend a text selection. However, the following commands no longer work at all, even if the add-in isn't loaded:
Selection.Extend Application.Run MacroName:="ExtendSelection" Selection.ExtendMode = True This problem started after I assigned ExtendSelection to a custom keyboard shortcut in my add-in. At first it worked. Then it didn't. Now it actually crashes Word. Again, this is true even if no add-ins are loaded, and even after deleting the Normal.dotm template and starting again from scratch. If I just press the F8 key, *then* ExtendSelection is turned on and works. But if I try to use the feature in a macro, using any of the above commands, I get nothing. I've been writing macros for many years, so I know my way around VBA pretty well, but this is one of the weirdest things I've ever seen. I know all about using Ranges vs. Selections, but sometimes I want the user to interact with the text, which means using Selection is sometimes necessary. When the macro has done its thing, I want to end the macro with Extend turned on for the user. I really need to be able to use the feature using a macro. Any ideas about how to solve the problem? Thanks very much for any help. Update: I see the same problem even if I start Word in Safe Mode. I've been working mainly in Word 365, but I just tested in Word 10 and in Word 2003, with the same problem: Selection.Extend doesn't work. Maybe this is a Windows problem? |
Tags |
extendselection, macros, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
VBAFiddler | Word VBA | 4 | 03-07-2021 12:38 PM |
![]() |
aerophil | Word | 6 | 09-12-2018 07:51 PM |
![]() |
judyn | Word | 5 | 10-18-2012 03:09 PM |
![]() |
jgriffin | Word | 2 | 06-24-2009 04:05 PM |
Excell stopped working | TomC | Excel | 4 | 05-26-2006 11:40 PM |