Is there an example of how to call Microsoft Internet Explorer as an automation server?

6 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 30 Jun 2015
The following example uses the ACTXCONTROL command to call Internet Explorer. Note: This may not work on newer versions of MATLAB as the COM interface for Internet Explorer may have changed.
This function takes in a URL as a string, loads the URL in Internet Explorer, copies the text from the URL, and returns the copied text as a string for use inside of MATLAB.
function str=CopyPasteIE(url);
ha = actxserver('internetexplorer.application');
ha.Visible = 1;
Navigate(ha, url);
pause(3); % Pause to let the page load
ha.document.execCommand('selectall','','');
ha.document.execCommand('copy','','');
str=clipboard('paste');
Note: The code provided in this example is for demonstration purposes and has not been thoroughly tested.

More Answers (0)

Tags

No tags entered yet.

Products

Community Treasure Hunt

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

Start Hunting!