フィルターのクリア

Manage powerpoint on Matlab

53 ビュー (過去 30 日間)
Ortinomax
Ortinomax 2015 年 4 月 15 日
コメント済み: Ashwini More 2020 年 2 月 3 日
Hello,
Part of my job is now to create powerpoint with a lot of figure which "that is good ..." "that is not..". And all of the figure came from Matlab. I spent time to copy/paste one by one (and resizing since my Matlab figure are big). I searched how to automate this but I didn't find the keys.
Apparently, it involves the COM Auomation but I don't find documentation on it.
I found those things, which looked helpful but...
I tried to copy-past the saveppt code (my trash.m file), but I get an error (although the file exist) :
??? Invoke Error, Dispatch Exception: Le fichier spécifié est introuvable.
op = invoke(ppt.Presentations,'Open','validation_ppt.pptx',[],[],0);
in english : The specified file is missing.
I don't find any documentation on this. So I'm blocked.
If someone tells me : "Hey, here there is a pdf file on COM Automation server which explain how it works in Matlab." I would be happy.
(I don't really searched an answer on my present issue, since it will only be the first of the list. But how to get find documentation.)
EDIT : I linked the wrong file.
  2 件のコメント
Ortinomax
Ortinomax 2015 年 4 月 16 日
Thanks Sebastian Castro
One solution lead to another problem. So i'm stuck again. I tried to have my figure copied in the clipboard and then paste on the powerpoint.
ppt = actxserver('powerpoint.application');
myPres=ppt.Presentations.Open('D:\Perso\myppt.pptx');
slide3=myPres.Slides.Item(3); % slect the slide 3
myFIg=figure(); %create the figure to test
plot([0 1],[1 1],'m');
print('-dmeta',myFIg) % copy to clipboard
% past to the slide 3, and get the handles of the picture (useful to resize, move...)
pic(k)=slide3.Shapes.PasteSpecial().Item(1);
It works, and almost good. But when I do the same manually (Figure>Edit>Copy Figure then Powerpoint>Paste), the picture has transparency. It needs the transparency back.
I thought it could be done with optional argument of the PasteSpecial method. But I need to pass an PpPasteDataType argument, and everything I tried fail (Type Mismatch).
Any help would be appreciated.
Ashwini  More
Ashwini More 2020 年 2 月 3 日
Hi,
I am working on adding images to existing powerpoint with matlab code. Your code helps me but instead of plotting figure in matlab, I have to add only .jpg figure.
So how can I change this code so that it will help me to copy specific image at specified location?
Any help would be appreciated!!

サインインしてコメントする。

採用された回答

Sebastian Castro
Sebastian Castro 2015 年 4 月 15 日
  1 件のコメント
Ortinomax
Ortinomax 2015 年 4 月 16 日
I missed it. Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Report Generator についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by