开发者

how to comunicate between Matlab And power point or Matlab and acrobat reader

I want to send a variable from Matlab to Pow开发者_开发百科erPoint or AcrobatReader, then depend on the value of this variable, PowerPoint goes to next or previous slide or exit, or zoom in or zoom out in acrobatreader. is it possible? it should be because nowadays we can control these kind of software with remote control it means they can get data from outside, but how is or what is the protocol? tanx.


You can drive PowerPoint via ActiveX

h = actxserver('PowerPoint.Application');
h.Visible = 1; % make the window show up
h.Presentations.Open('C:\Temp\MyPresentation.pptx');
%%
h.ActivePresentation.SlideShowSettings.Run;  % there is now a slide show running
%%
hShow = h.SlideShowWindows.Item(1);
%%
hShow.View.GotoSlide(3);  % go to the 3rd slide
hShow.View.Next;   % go to next slide
%%
hShow.View.Exit;   % end slide show
%%
h.ActivePresentation.Close;   % close the presentation
%%
h.Quit;
delete(h);

You should check out the MATLAB documentation for actxserver, and also the MSDN Power Point developer Reference. Most of the methods and properties of an ActiveX object show up in MATLAB as methods and properties. You can use methods(h) and get(h) to examine them. The only tricky ones are collections. You will generally need to say something like hCollection.Item(N) to get the N-th item from the collection.


My understanding is that remote control presenters work by simulating keystrokes (such as right arrow for next slide, etc.) To do something similar in MATLAB, you could explore java.awt.Robot in the same way as this post from MathWorks.


Hey maybe this will help you,

you can have a look on http://www.mathworks.de/matlabcentral/fileexchange/44851-toppt

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜