How to change a template

조회 수: 2 (최근 30일)
Ortinomax
Ortinomax 2015년 4월 20일
Hello everybody,
In order to fill my powerpoint with Matlab pictures, I want to open a new powerpoint and fill it with Matlab figure.
My problem is to open the new presentation, but in my own template. The method AppyTemplate exist for Presentation in Powerpoint library.
"Sub ApplyTemplate(FileName As String) Member of PowerPoint.Presentation"
But when I try :
ppt = actxserver('powerpoint.application'); %Launch the thing
myPres=ppt.Presentations.Add(); % Create the new presentation
myPres.ApplyTemplate('MyTemplate'); % MyTemplate is a potx-file in the directory advised by Powerpoint when saving.
I get the following error :
_??? Invoke Error, Dispatch Exception:
Source: Microsoft PowerPoint 2013
Description: Presentation.ApplyTemplate : Invalid
request. PowerPoint could not open the file.
Help File:
Help Context ID: 0
Error in ==> trash3 at 6
myPres.ApplyTemplate('MyTemplate');_
So I don't knowif the file is found but problem or not even found. The Help File and Help Context ID don't help... :-(
Any ideas on what don't work ?
P.S. MATLAB doesn't allow to upload a template for powerpoint.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by