Is there an example of how to call Microsoft Internet Explorer as an automation server?
6 views (last 30 days)
Show older comments
I would like an example of how to use MATLAB and ActiveX to call Internet Explorer as an automation server.
Accepted Answer
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Use COM Objects in MATLAB 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!