Hi Abdul Rasyid Haron,
I understand that you would like to change the layout of the first blank slide of your presentation to another layout like “Three Content” using the MATLAB Report Generator.
The “Layout” property of slide class is read-only. Hence, the layout of the slide cannot be changed from “Blank” to any other layout. Also, there is no built-in layout available called “Three Content” similar to “Two content”.
A possible workaround for changing the layout would be to customize the “Blank” slide itself and create three text boxes as content spaces. To do this, please follow the bellow steps:
- Get the slides from the PPT object.
- Iterate through the slides and find the first blank slide.
- Customize this slide to have one title and three content spaces by appending text boxes.
if(slide.Layout == "Blank")
add(titleTB,'This is the title of my blank slide');
contentTB1.X = string(X) + 'in';
contentTB1.Width = '3.9in';
contentTB1.Height = '4.5in';
add(contentTB1,'This is Content' + string(1+i) +' space of my blank slide');
Also, I have attached the script - “changeLayout.m” - containing the workaround. You can refer to this for more clarity.
You can refer to the following documentation pages for further customizations:
Hope this helps and solves your query regarding changing the layout of slides using MATLAB Report Generator!