Vidhathri Avadhany
Vidhathri Avadhany

Reputation: 3

How to "Select all and Copy" on the Error List of Visual Studio using Visual Studio2019 Macros

I know that we can do a Ctrl A + Ctrl C on the error list to copy all items in the error list. I want to automate this using Visual Studio Macros.

DTE.ExecuteCommand("Edit.SelectAll");

is not working for me. It says "Command Edit.SelectAll is not available". What could be done to do a Ctrl A operation using Visual Studio Macro?

Upvotes: 0

Views: 325

Answers (1)

Sergey Vlasov
Sergey Vlasov

Reputation: 27880

You can use SendKeys to emulate Ctrl A when the Error List window is selected:

System.Windows.Forms.SendKeys.Send("^a");

Upvotes: 0

Related Questions