How to change presentation slide title box size and position?

26 ビュー (過去 30 日間)
Michael Boyle
Michael Boyle 2022 年 5 月 9 日
回答済み: Michael Boyle 2022 年 5 月 9 日
I am creating a powerpoint presentation in matlab and I am trying to adjust the size and position of the title box
import mlreportgen.ppt.*
slides = Presentation('test_temp');
add(slides,'Title Slide');
contents = find(slides,'Title');
replace(contents(1),'Test Name');
slide = add(slides,'Title Only');
stitle = 'title1';
slide_title = Paragraph(stitle);
stitle.X = '0.44in'; % This and the next line are where I am trying to change the box size/location
stitle.Y = '0in';
slide_title.FontSize = '24'; % This line works to change font size
replace(slide,'Title',slide_title);
I can't find anything about changing the title only slide type size and location, any help is appreciated. Thank you!

採用された回答

Michael Boyle
Michael Boyle 2022 年 5 月 9 日
Figured it out. Instead of choosing 'Title Only' as slide type, choose 'Blank' and insert your own custom text box
import mlreportgen.ppt.*
slides = Presentation('test_temp');
add(slides,'Title Slide');
contents = find(slides,'Title');
replace(contents(1),'Test Name');
slide = add(slides,'Blank');
tb = TextBox();
tb.X = '0.44in';
tb.Y = '0in';
tb.Width = '12.16in';
tb.Height = '0.9in';
stitle = 'title1';
slide_title = Paragraph(stitle);
slide_title.FontSize = '24';
slide_title.Bold = true;
slide_title.FontColor = 'blue';
add(tb,slide_title);
add(slide,tb);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by