2.14.2.26 pef_pptslide

Menu Information

Right-click on the folder in Project Explorer: Send Graphs to PowerPoint

Brief Information

Send selected graphs to PowerPoint

Additional Information

Minimum Origin Version Required: 2016 SR0

Command Line Usage

1.pef_pptslide export:=recursive;

2.pef_pptslide export:=open top:=10 left:=10 bottom:=10 right:=10 title:=bottom;

3.pef_pptslide embed:=1 title:=top mode:=lname slide:=2 slidemode:=insert;

4.pef_pptslide export:=page title:=top mode:=lname slidemode:=insert srcf:="C:\Program Files\OriginLab\Origin2016\Samples\Import and Export\Column_Plots_in_Sample_OPJ.pptx" dstf:=E:\MyOriginGraphs.pptx;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Select Graph(s) export

Input

int

0
Specify which graph(s) to be exported to PowerPoint slides.

Option list:

  • folder{0}:All in Active Folder
    All the graph pages in active folder of the project (see this in Project Explorer) will be exported. The pages in subfolders will not be included. Hidden pages will also be included, while embedded graph pages in worksheet will not be included.
  • recursive{1}: All in Active Folder (Recursive)
    All the graph pages in active folder of the project (see this in Project Explorer) will be exported. The subfolders will be recursively included.
  • open{2}: All in Active Folder (Open)
    All the opened (not hidden) pages in active folder of the project will be exported.
  • project{3}: All in Project
    All the graph pages in the project will be exported. Hidden graph pages will be included while embedded pages will not.
  • page{4}: Active Page
    Currently active page will be exported.
  • specified{5} Specified
    Other than the options above. Specify the pages in Graph Page below.
Include Embedded Graphs embed

Input

int

0
Specify whether to export embedded graphs to PowerPoint slides.
Insert Graphs as insert

Input

int

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

Option list:

  • pic{0}:Picture
    Export graphs to PowerPoint slides as pictures.
  • embed{1}:Embedded Object
    Export graphs to PowerPoint slides as embedded objects.
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.
Keep Aspect Ratio keepratio

Input

int

1
Specify whether to keep aspect ratio.
Title Line title

Input

int

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

Option list:

  • none{0}:None
    Do not show the title.
  • top{1}:Top of Slide
    Show the title at the top of screen.
  • bottom{2}:Bottom of Slide
    Show the title at 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:

  • custom{0}:Custom
    Use a customized string(supports substitution notation) as title.
  • sname{1}:Window Short Name
    Use the short name of each graph window as title.
  • lname{2}: Window Long Name
    Use the long name of each graph window as title.
  • lsname{3}: Window Short and Long Name
    Use the short name and long name of each graph window as title.
  • path{4}: Window Path
    Use the file path of each graph window in Project Explorer as title.
Custom Title String custom

Input

string

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

Input

int

1
Define the starting slide index number in the PowerPoint presentation file.
Slide Mode slidemode

Input

int

1
Specify the slide mode for exported graphs.

Option list:

  • insert{0}: Start New
    Starting new slide for each exported graph.
  • replace{1}: Overlay Existing
    Replace existing slide(s).
Load File/Template (Optional) srcf

Input

string

<unassigned>
Specify a PowerPoint template file for the exported slides.
Save File As (Optional) dstf

Input

string

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

Description

This function is capable of exporting specified graphs to PowerPoint slides. Each graph will be pasted into one slide in the PowerPoint file.

It offers an option to allow you to select graphs within project, folders or subfolders and whether to skip the hidden graphs that are not shortcuts.

The order of exportation is as following: The graphs in the top folder will be exported first, then the graphs in subfolder will be exported. If there are more than one subfolder, alphabetical order will be applied to process the subfolders. For graphs in the same folder, the slide indices (index of Slide column in the Project Explorer, which can be change by dragging and dropping graphs in the Project Explorer.) of the graphs will be applied.

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

  1. Open the project named <Origin Installation Directory>\Samples\Graphing\Customizing Graphs.opj.
  2. Highlight the root folder (Customizing Graphs) of the project, then right-click and select Send Graphs to PowerPoint from the context menu to open the pef_pptslide dialog.
    Pef pptslide example 01.png
  3. In the pef_pptslide dialog, change the settings as the following image shows. Note that PPT template used locates in <Origin Installation Directory>\Samples\Import and Export\Column_Plots_in_Sample_OPJ.pptx.
    Pef pptslide example 02.png
  4. Click the OK button, then the graphs in the project will be sent as embedded objects to the new created PowerPoint file. The slides of this file show as the image below. Then you can find where the PPT file exported in Message Log window.
    Pef pptslide example 03.png

Related X-Functions

pef_slideshow,pemp_pptslide, pef_slideshow


Keywords:publishing, export