File Exchange

image thumbnail

Calling MATLAB from PowerPoint

version (15.9 KB) by Brett Shoelson
Here are 5 simple steps that will have you executing your MATLAB code from PowerPoint in no time!


Updated 01 Sep 2016

View License

A white paper that describes a simple workflow, using VB code (provided in a sample Master.bas file), to call any MATLAB code or to run any MATLAB files from within PowerPoint. Simply edit the .bas file per the instructions, and load it into your PowerPoint. Then edit any object in the PowerPoint to modify its Action Settings, select Run Macro, steer to the proper macro, and you're up and running.
Also includes a tip for managing demos, code, etc. from a single-source *.BAS document.

Cite As

Brett Shoelson (2020). Calling MATLAB from PowerPoint (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Rena Berdine

Vesal Daneshvar

Aubrey Howard

I also struggled with where to add the code. I now know it should go AFTER all the other code was placed in the prompt. Also, the "right click --> actions" command is no long a function in latter versions of Powerpoint. To access this, I had to go, in powerpoint, to Insert --> Links --> Actions after I had selected the image I wanted to link. All together, this works beautifully. Thank you so much for a great solution to a challenging problem.

Anna McGilloway

My apologies, I was pasting the custom code in the wrong spot. Figured it out.


bashir mohamed


Works great.


shahnaz fatima

can u explain 4 th point in pdf file clearly.
"link the subroutine to some object". how can i do that? how can i load into power point. please

Gamal Gamil

Thank You


Updated license

saved white paper as PDF; added copyrights

updated license file to The MathWorks

added copyright

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux