Why do I receive an error message when I attempt to run NOTEBOOK in MATLAB?

7 views (last 30 days)
When I attempt to start Notebook in Microsoft Word by typing
notebook
at the MATLAB command prompt, I instead receive the error message
??? Error using ==> actxserver
Server creation failed. Invalid ProgID 'matlab.application'
Error in ==> notebook>startMatlabAutomationServer at 273
hAppMatlab = actxserver('matlab.application');
Error in ==> notebook at 38
hAppMatlab = startMatlabAutomationServer(hAppMatlab);

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 12 Mar 2021
Edited: MathWorks Support Team on 12 Mar 2021
You are seeing the error because MATLAB has not yet been registered as a Component Object Model (COM) server. To perform this registration, MATLAB needs to be started once with the "-regserver" startup option. To do this, please perform the following steps:
1. Close MATLAB, then go to the icon from which you start MATLAB, right click on it, and select "Properties"
2. In the "Target" field, you will see the file path that Windows uses to execute MATLAB. To the end of this path, add a space and then write:
-regserver
Click "OK" to save the change.
3. Start MATLAB. The NOTEBOOK command should now work properly.
4. Because the registration need only be performed once, you should now repeat steps 1 through 3 and remove the "-regserver" flag from the MATLAB shortcut path.
Edit:
The above workflow is for MATLAB R2018a or earlier versions. 
notebook has been removed. To create a document that combines code, formatted text, and output, use the Live Editor instead.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!