Filter löschen
Filter löschen

How to change presentation slide title box size and position?

5 Ansichten (letzte 30 Tage)
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!

Akzeptierte Antwort

Michael Boyle
Michael Boyle am 9 Mai 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);

Weitere Antworten (0)

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by