PowerPoint.Presentation

Description

A class for creating, opening, and editing PowerPoint presentations.

Properties

slides Accesses slides in the presentation (Read Only).
slideSize Gets/sets the size of the slides in the presentation.
slideSizeType Gets/sets the SlideSizeType of the presentation, an enumeration of PowerPoint.SlideSizeType.
template The template the presentation is using (Read Only).

Methods

addSlide Adds a slide with a specific layout.
applyTemplate Applies a Template from a file.
applyTheme Applies a theme from a file.
close Closes the presentation and quits the current PowerPoint instance.
save Saves the presentation.

Static Methods

create Create a new empty presentation.
open Opens a presentation from a given path.

Details

Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.slides

readonly PowerPoint.Slide slides

Description

Accesses slides in the presentation (Read Only).

Accessing the Number of slides in the presentation

You can access the number of slides in the presentation with the following code.

presentation.slides.length

Accessing slides by Rank

You can access an individual slide with the following code.


				presentation.slides[1] // first slide
				presentation.slides[presentation.slides.length] // last slide
				presentation.slides[i] // i-th slide
			

Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.slideSize

Vec2 slideSize

Description

Gets/sets the size of the slides in the presentation.


				PowerPoint.Presentation presentation = PowerPoint.Presentation.create(1);
				presentation.addSlide(PowerPoint.Layout.blank);
				presentation.slideSize = Vec2(400,400);
				return presentation.slideSize;
			

Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.slideSizeType

int slideSizeType

Description

Gets/sets the SlideSizeType of the presentation, an enumeration of PowerPoint.SlideSizeType.


				PowerPoint.Presentation presentation = PowerPoint.Presentation.create(1);
				presentation.addSlide(PowerPoint.Layout.blank);
				presentation.slideSizeType = PowerPoint.SlideSizeType.OnScreen16x10;
				return presentation.slideSizeType;
			

Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.template

readonly string template

Description

The template the presentation is using (Read Only).


			  PowerPoint.Presentation presentation = PowerPoint.Presentation.open(modeldir() + "\\Presentation.pptx", 1);
			  return presentation.template;
			
Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.addSlide()

void addSlide( int layout )

Parameters

layout The layout you want to apply to the slide when it is added. This should be an enumeration of PowerPoint.Layout.

Description

Adds a slide with a specific layout.


			  PowerPoint.Presentation presentation = PowerPoint.Presentation.create(1);
			  presentation.addSlide(PowerPoint.Layout.blank);
			
Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.applyTemplate()

void applyTemplate( string filePath )

Parameters

filePath The path to where the theme is.

Description

Applies a Template from a file.


			  PowerPoint.Presentation presentation = PowerPoint.Presentation.create(1);
			  presentation.applyTemplate(modeldir() + "\\Template.potx");
			
Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.applyTheme()

void applyTheme( string filePath )

Parameters

filePath The path to where the theme is.

Description

Applies a theme from a file.


			  PowerPoint.Presentation presentation = PowerPoint.Presentation.create(1);
			  presentation.applyTheme(modeldir() + "\\Theme.thmx");
			
Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.close()

void close( )

Description

Closes the presentation and quits the current PowerPoint instance.


			  PowerPoint.Presentation presentation = PowerPoint.Presentation.create(1);
			  presentation.save(modeldir() + "\\Presentation.pptx");
			  presentation.close();
			
Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.save()

void save( string filePath = 0 )

Parameters

filePath The path to where you want to save the presentation. If not specified, then it will save over the file path the presentation was opened from or previously saved to.

Description

Saves the presentation.


			  PowerPoint.Presentation presentation = PowerPoint.Presentation.create(1);
			  presentation.save(modeldir() + "\\Presentation.pptx");
			
Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.create()

static void create( int visible )

Parameters

visible Have the created presentation visible to the user or not.

Description

Create a new empty presentation.


			  PowerPoint.Presentation presentation = PowerPoint.Presentation.create(1);
			
Do no remove, this fixes the anchor on doc.flexsim.com

PowerPoint.Presentation.open()

static void open( string filePath , int visible )

Parameters

filePath The path to the PowerPoint presentation you want to open.
visible Have the opened presentation visible to the user or not.

Description

Opens a presentation from a given path.


			  PowerPoint.Presentation presentation = PowerPoint.Presentation.open(modeldir() + "\\Presentation.pptx", 1);