The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 How to make several .ppt files in a batch run?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hkkim

Republic of Korea
35 Posts

Posted - 09/12/2012 :  01:29:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Pro 8.1 SR3
Operating System: Windows XP

Hi Origin guru!, I need your help! I want to make several PowerPoint files using a batch processing with LabTalk script without user interaction. The file paths and names are supplied as inputs. The generated .ppt files are checked after batch run. I attached some scripts below. Could I make it only LabTalk script? If not, Origin C introduce will be required? Could you give me some guidelines for solution?
Thanks in advance!

------------------------------------------------------------------------
def drawGraphs
{
...
}

def mainWork
{
...
Loop (i1, %1, caseno) // outer loop
{
...
Loop (i2, 5, 7) { // inner loop
...
} // end loop i2
drawGraphs; // call macro
...
} // end loop i1
// Send Graphs to PowerPoint
pef_pptslide top:=10 bottom:=10 left:=10 right:=10 title:=2;
// Save .ppt file using input data(path & name) without user interaction
// Close PowerPoint and return to LabTalk
// How ???
}

// Accept input data(path & name)
...
mainWork 9; // call macro for test 1

// I want to continue below lines continuously
mainWork 12; // call macro for test 2
mainWork 7; // call macro for test 3

greg

USA
1378 Posts

Posted - 09/17/2012 :  2:01:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
LabTalk cannot "talk" to PowerPoint. For that you would need to use OriginC programming and talk to PowerPoint as a COM Client.

We have an example of using Word as a COM Server.
Open Code Builder and add the
"...\Samples\COM Client\MS Office\ReportCreation.c"
file to the Workspace and Build. Then run this in the Script or Command Window:
CreatReport
which will create two graphs and two Word documents.

You would need to consult the Office documentation to find out how to use COM to create a PowerPoint instance as visible. Then you can use pef_pptslide to push graphs to the open instance of PowerPoint. Then use COM - again in OriginC - and Save the PPT and Close or New in Powerpoint.
Go to Top of Page

hkkim

Republic of Korea
35 Posts

Posted - 09/24/2012 :  04:08:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello, greg!
I solved my problem with your help.
Thank you very much.
hkkim

Edited by - hkkim on 09/24/2012 9:09:43 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000