Previous Document Next Document

Object Model Reference : Classes : A : Application : Methods : Application.OpenCorelScriptFile


Application.OpenCorelScriptFile

Function OpenCorelScriptFile(FileName As String) As CorelScriptFile

Description

Member of Application

The OpenCorelScriptFile method opens a Corel SCRIPT file and returns a reference to the CorelScriptFile object which allows you to load and execute a Corel SCRIPT program.

Parameter
Description
FileName
Specifies the full path name of the Corel SCRIPT file to open and execute

VBA example

The following VBA example opens an existing Corel SCRIPT file. An ellipse is created on the active layer of the current document and the script runs to create a fill effect, Alien Sky, on the ellipse.

Sub Test()
 Dim csf As CorelScriptFile
 Set csf = OpenCorelScriptFile("C:\Corel\Graphics10\Draw\Fill_Out\Fills\Fountain\aliensky.csc")
 ActiveDocument.ActiveLayer.CreateEllipse2 3, 3, 2
 csf.Play
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.