# 2.14.2.28 pemp_pptslide

Highlight and right click on the graphs in the Project Explorer: Send Graphs to PowerPoint

## Brief Information

Send specific graphs to PowerPoint

Minimum Origin Version Required:8.1 SR0

This X-Function has been updated since 9.1 SR0, implementing with the page, mode, custom, slide, srcf, dstf variable and the GUI access of title variable.

## Command Line Usage

 1.pemp_pptslide pages:="Graph1%(LF)Graph2" insert:=pic title:=top mode:=slname; 

2.pemp_pptslide pages:=%H top:=10 bottom:=10 left:=10 right:=10 title:=2; 

## Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Graph Pages pages

Input

string

<unassigned>
Specifies the graph windows to be exported. Use %(CRLF) or %(LF) as separator between the graph windows.
Insert Graphs as insert

Input

int

1
Specify the form of graphs when exported to PowerPoint slides.

Option list:

• pic:Picture
Export graphs to PowerPoint slides as pictures.
• embed:Embedded Object
Export graphs to PowerPoint slides as embedded object.
Top Margin (%) top

Input

double

0
Specify the top margin of the slide.
Left Margin (%) left

Input

double

0
Specify the left margin of the slide.
Bottom Margin (%) bottom

Input

double

0
Specify the bottom margin of the slide.
Right Margin (%) right

Input

double

0
Specify the right margin of the slide.
Title Line title

Input

int

0
Specifies how the title will be shown in the PowerPoint slides.

Option list:

• none:None
Do not show the title.
• top:Top of Slide
Show the title in the top of screen.
• bottom:Bottom of Slide
Show the title in the bottom of screen.
Title Mode mode

Input

int

1
This variable is only available when the title variable is not 0. It specifies what should be used as the exported graph title in each slide.

Option list:

• 0:custom
Use a customized string(supports substitution notation) as title.
• 1:sname
Use the short name of each graph window as title.
• 2:lname
Use the long name of each graph window as title.
• 3:lsname
Use the short name and long name of each graph window as title.
• 4:path
Use the file path in project explorer of each graph window as title.
Custom Title String custom

Input

string

<unassigned>
This variable is only writable when mode is set to custom. It uses to specify a custom string to be used as slide title.
Starting Slide Index slide

Input

int

1
Define the start slide index in the PowerPoint presentation file for exported graphs.
Source File Name srcf

Input

string

<unassigned>
Specify a PowerPoint template file for the exported slides.
Destination File Name dstf

Input

string

<unassigned>
Specify the name of the PowerPoint Presentation file (*.ppt;*.pptx;*.pptm), PowerPoint Show (*.pps;*.ppsx;*.ppsm) or Design Template (*.pot;*.potx;*.potm). Slides will be exported to this file.

## Description

This function is used to export the selected graphs into PowerPoint slides. Each graph will be pasted into one slide in the PowerPoint file. The order of exportation is the slide order (which can be seen in the Project Explorer) of the graphs.

Note: To export graphs to PowerPoint slides, Microsoft Office must have been installed. If the version of Office is 2007, Office has to be upgraded to SP2. Or this X-Function will not work fine.

## Examples

This example will show how to export four selected graphs to PowerPoint slides.

1. Create a new project and import the data <Origin Program Directory>\Samples\Curve Fitting\Multiple Gaussians.dat.
2. Highlight column B and select Plot > Basic 2D: Line to create Graph1.
3. Repeat step 2 with columns C, D and E, respectively. This creates Graph2, Graph3 and Graph4.
4. Open Project Explorer, press the CTRL key on the keyboard and click Graph1, Graph2, Graph3 and Graph4, to select all four graphs.
5. Right click on the selected graphs and choose Send Graphs to PowerPoint. This opens the pemp_pptslide dialog box.
Note: you can also run pemp_pptslide -d; in the command window to bring up the dialog box.
6. In the dialog box, set the following:
7. Click the OK button. The four graphs are exported to PowerPoint slides, in the order in which they appear in Project Explorer.

## Related X-Functions

Keywords:publishing, export