How to change presentation slide title box size and position?

13 views (last 30 days)
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!

Accepted Answer

Michael Boyle
Michael Boyle on 9 May 2022
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);

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!