Get Started
Usage API
More information

ApplyLayout

ApplyLayout(oLayout) → { bool }

Applies the specified layout to the current slide.

Parameters:

Name Type Description
oLayout ApiLayout

Layout to be applied.

Returns:

Type
bool

Example

Copy code
builder.CreateFile("pptx");
var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
var oMaster = oPresentation.GetMaster(0);
var oLayout = oMaster.GetLayout(4);
oSlide.ApplyLayout(oLayout);
builder.SaveFile("pptx", "ApplyLayout.pptx");
builder.CloseFile();

Resulting document