We help IT Professionals succeed at work.

Open an Excel file using "Send To" in File Exporer and passing along file name

I have an Excel 2019 spreadsheet macro that has some VBA in it.  Ideally what I would like is

  1. for a user to right-click a file in Windows Explorer (Windows 10) and select "Send to" and have the Spreadsheet available from the "Send to" menu.  Then, when the spreadsheet opens, it gets the name of the file and Autoruns using that file name in the VBA code
  2. Or, if the spreadsheet is opened without the "Send to" method, it will not autorun

Is this possible, and if so, please help...
Watch Question


To get to the SendTo folder, you’ll need to open up an Explorer window, and then paste in the following to the address bar.


take a look at the others , you ll have an idea how to implement a new item.

for the vba code aka macro thing, i doubt you can find a way to run it without user prompt for security purposes.


Fabrice LambertConsulting
Distinguished Expert 2017

I dont think that's doable, as neither the Application nor the Workbook objects offer a way to retrieve the command line.


Thank you both!