rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 301 forks source link

Inspection for shadowing of Word Commands #3279

Open ThunderFrame opened 7 years ago

ThunderFrame commented 7 years ago

Word has approximately 950+ built-in commands that can be executed with Application.Run "CommandName" - See the full list by going to Developer Tab, Macros, and choose "Macros in: Word commands".

In many cases, the same command can be executed by using Application.WordBasic.CommandName

VBA code should try to avoid shadowing these built-in commands.

Vogel612 commented 7 years ago

Are we not yet resolving these? It seems like a huge pain to add some 950+ command declarations to the declaration loader manually... Because as soon as RD knows about these commands, the usual Shadowing inspection should be able to take care of this

ThunderFrame commented 7 years ago

I'm hoping I can lift the names from the list box, or with sendkeys. In addition to the 950+ commands, those would also be 950+ late-boynd members of WordBasic.