T O P I C R E V I E W |
hkkim |
Posted - 09/12/2012 : 01:29:30 AM 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 |
2 L A T E S T R E P L I E S (Newest First) |
hkkim |
Posted - 09/24/2012 : 04:08:46 AM Hello, greg! I solved my problem with your help. Thank you very much. hkkim |
greg |
Posted - 09/17/2012 : 2:01:29 PM 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. |
|
|