Azzera filtri
Azzera filtri

How to change presentation slide title box size and position?

5 visualizzazioni (ultimi 30 giorni)
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!

Risposta accettata

Michael Boyle
Michael Boyle il 9 Mag 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);

Più risposte (0)

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by