Borrar filtros
Borrar filtros

How to change presentation slide title box size and position?

5 visualizaciones (últimos 30 días)
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!

Respuesta aceptada

Michael Boyle
Michael Boyle el 9 de Mayo de 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);

Más respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by