How to Launch a Microsoft Store App from Excel VBA
Question details
The user needs to open a Microsoft Store application using an Excel VBA macro.

- Product
- Microsoft Excel
- Device & OS
- Windows
- Scenario
- Writing an Excel macro to automate a workflow that requires opening an external Microsoft Store application.
- Observed behavior
- The standard VBA Shell function fails because Microsoft Store applications do not expose a traditional executable (.exe) path.
Ensure you have the exact PackageFamilyName of the Microsoft Store app you wish to launch, which can be found easily using Windows PowerShell.
Launch the App Using WScript.Shell and AppsFolder
Bypass the need for an EXE file by calling the app's Package Family Name directly through the Windows Shell.
Since Microsoft Store (UWP) apps reside in a protected directory and do not function like standard executables, you cannot use the native VBA `Shell` command directly. Instead, you can use the `WScript.Shell` object to trigger the app via the Windows AppsFolder.
Open Windows PowerShell and run the command `Get-StartApps`. Locate your target app in the list and copy its AppID (formatted as PackageFamilyName!App).
In Excel, press `ALT + F11` to open the Visual Basic for Applications (VBA) editor.
Click on `Insert` in the top menu, then select `Module` to create a blank script area.
Enter the following code into the module: `CreateObject("WScript.Shell").Run "shell:AppsFolder\YourAppID"`, replacing 'YourAppID' with the exact ID you copied from PowerShell.
Press `F5` to run the macro. The specified Microsoft Store application will launch immediately.
Use the Application's Registered URI Protocol
If the app supports a custom URI scheme, you can launch it like a web hyperlink.
Automate Workflows with VBA in WPS Spreadsheet
WPS Office offers robust VBA support, allowing you to run your existing Excel macros seamlessly. You can easily execute WScript.Shell commands and automate tasks exactly as you would in Microsoft Excel.
- 1. Download and Install WPS Office: Get the latest version of WPS Office from the official website and install it on your Windows PC.
- 2. Open Your Macro Workbook: Launch WPS Spreadsheet and open your existing macro-enabled workbook (.xlsm).
- 3. Access the VBA Editor: Navigate to the 'Tools' tab and click on 'Developer' to open the built-in VBA Editor.
- 4. Run Your Shell Scripts: Paste your WScript.Shell code and execute the macro to seamlessly launch your Store apps.

Frequently Asked Questions
Why doesn't the standard VBA Shell function work for Windows Store apps?
Microsoft Store apps (also known as UWP apps) are installed in a hidden WindowsApps directory and do not use standard standalone executable (.exe) files. The standard VBA Shell function strictly requires a direct file path, which UWP apps restrict for security and architecture reasons.
How can I easily find the PackageFamilyName of an installed Store app?
You can find this by opening Windows PowerShell and typing the command `Get-StartApps`. This will output a list of the display names and AppIDs (which include the PackageFamilyName) of all applications currently installed for your user profile.
Can I pass command-line arguments to a Microsoft Store app using VBA?
Yes, but only if the specific app supports receiving arguments. If it does, you can append the arguments to the URI string or the AppsFolder string in your `WScript.Shell` run command, similar to how you would structure a standard command prompt execution.




