cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
nshivan
Level I

Title Slide in PowerPoint

Hi, 

I'm saving my analysis into a PowerPoint presentation.   The report in .pptx is great.  However, I can't get a title slide to add to this presentation. 

I would like to add a slide at the beginning and call it a specific name by using JSL.  Is this doable?

 

jrn << Save Presentation( path || "Report.pptx" );

1 ACCEPTED SOLUTION

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: Title Slide in PowerPoint

JMP can create a title slide but you are going to have to work for it, depending upon what you want for your title page.

 

JMP message Save Presentation() does not save TextBox, BorderBox and OutlineBox the same as it does a PictureBox.

 

Below is a script with where I created a dynamic (script/data-based) title page.

Important Items to Note:

  • If the TextBox Size is too large the size will be scaled down.
  • \!N is a new line. I added 4 to somewhat center the title.  
  • You will have to play around with Font Size and TextBox Size if you do not want the title to wrap.
  • Freeze All is important. This saves the TextBox as a picture, so the ususal TextBox, OutlineBox, BorderBox Save Presentation formatting will not apply.

As stated in another post today :

Since 2004 our BKM has been to use use P3ICLI, a no cost, copyrighted with
the Free Software Foundation program.

Description: P3ICLI (PowerPoint Picture Insert Command Line Interface) is a
script driven application that inserts user-selected picture and/or graphic files
into Microsoft PowerPoint (R) slides.

P3ICLI can be downloaded from https://sourceforge.net/projects/p3icli/
It documents a JSL example, including the ppt template, JSL script, explanation and resulting
pptx file at https://p3icli.sourceforge.io/jsl_example.html. We like the flexibility it offers
to customize, size, layout, titles and captions.

Names Default To Here( 1 );
dt= Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( :weight ), x( :height ), Group By(:sex), Fit Line({report(0)}) );
rbiv = biv << report;
rbiv[Framebox(1)] << row legend(:sex, color(1), marker(1));
rbiv << Save Presentation( "c:/temp/ann_jmp_example.pptx");
rbiv[Framebox(1)] << frame size(1500,480);
rbiv << Save Presentation( "c:/temp/ann_jmp_example.pptx", append );
wait(0);
biv << close window;

bob = BorderBox("", 
    VlistBox(ttl1 = TextBox(Repeat("\!N",4) || "Custom Report for File: " || char(dt<<get name)) ,
     ttl2 = TextBox("\!N" || char(As Date(Today())) )
  )) ;
ttl1 << Set Font( "Arial Black" );
ttl1 << Set Font Size( 32 );
ttl1 << Font Color("Blue");
ttl1 << set Width (720);
ttl1 << Justify Text("Center");

ttl2 << Set Font( "Arial Black" );
ttl2 << Set Font Size( 24 );
ttl2 << Font Color("Black");
ttl2 << set Width (720);
ttl2 << Justify Text("Center");

jj = new Window("",<<Journal);
bob << Journal(Freeze All);
jj << Save Presentation("c:/temp/ann_jmp_example.pptx", Insert(Begin) );

current Journal() << Close Window();

 

View solution in original post

4 REPLIES 4
gzmorgan0
Super User (Alumni)

Re: Title Slide in PowerPoint

Save Presentation saves results to a default template.  You can also save presentation to a custom template. So I suggest you create the PPTX with a title slide.  Then use 

jrn << Save Presentation(mypath/myname.pptx, Append);

/* Genral Syntax
db << Save Presentation("path", <template("path")>,<(Insert("Begin"|"End"|N) | Replace("Begin"|"End"|N) | "Append")>,
<Outline Titles("None"|"Hide"|"TopLeft"|"TopRight"|"BottomLeft"|"BottomRight")>,
<"Native"|"EMF"| "PNG" | "JPG" | "BMP" | "GIF" | "TIF">);
*/

 

nshivan
Level I

Re: Title Slide in PowerPoint

Hi gzmorgan0

 

This doesn't exactly solve my problem.  With this method, I'm having to create a pptx with a title slide first and then append my resutls to it.  But if JMP cannot create a title slide using scripts;  then I guess this solution is OK.  

 

Thanks!

gzmorgan0
Super User (Alumni)

Re: Title Slide in PowerPoint

JMP can create a title slide but you are going to have to work for it, depending upon what you want for your title page.

 

JMP message Save Presentation() does not save TextBox, BorderBox and OutlineBox the same as it does a PictureBox.

 

Below is a script with where I created a dynamic (script/data-based) title page.

Important Items to Note:

  • If the TextBox Size is too large the size will be scaled down.
  • \!N is a new line. I added 4 to somewhat center the title.  
  • You will have to play around with Font Size and TextBox Size if you do not want the title to wrap.
  • Freeze All is important. This saves the TextBox as a picture, so the ususal TextBox, OutlineBox, BorderBox Save Presentation formatting will not apply.

As stated in another post today :

Since 2004 our BKM has been to use use P3ICLI, a no cost, copyrighted with
the Free Software Foundation program.

Description: P3ICLI (PowerPoint Picture Insert Command Line Interface) is a
script driven application that inserts user-selected picture and/or graphic files
into Microsoft PowerPoint (R) slides.

P3ICLI can be downloaded from https://sourceforge.net/projects/p3icli/
It documents a JSL example, including the ppt template, JSL script, explanation and resulting
pptx file at https://p3icli.sourceforge.io/jsl_example.html. We like the flexibility it offers
to customize, size, layout, titles and captions.

Names Default To Here( 1 );
dt= Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( :weight ), x( :height ), Group By(:sex), Fit Line({report(0)}) );
rbiv = biv << report;
rbiv[Framebox(1)] << row legend(:sex, color(1), marker(1));
rbiv << Save Presentation( "c:/temp/ann_jmp_example.pptx");
rbiv[Framebox(1)] << frame size(1500,480);
rbiv << Save Presentation( "c:/temp/ann_jmp_example.pptx", append );
wait(0);
biv << close window;

bob = BorderBox("", 
    VlistBox(ttl1 = TextBox(Repeat("\!N",4) || "Custom Report for File: " || char(dt<<get name)) ,
     ttl2 = TextBox("\!N" || char(As Date(Today())) )
  )) ;
ttl1 << Set Font( "Arial Black" );
ttl1 << Set Font Size( 32 );
ttl1 << Font Color("Blue");
ttl1 << set Width (720);
ttl1 << Justify Text("Center");

ttl2 << Set Font( "Arial Black" );
ttl2 << Set Font Size( 24 );
ttl2 << Font Color("Black");
ttl2 << set Width (720);
ttl2 << Justify Text("Center");

jj = new Window("",<<Journal);
bob << Journal(Freeze All);
jj << Save Presentation("c:/temp/ann_jmp_example.pptx", Insert(Begin) );

current Journal() << Close Window();

 

nshivan
Level I

Re: Title Slide in PowerPoint

Yes, this worked.   Thank you!