The Exec(Command, Mode) Cicode function
can be used to open documents in their appropriate applications
software as well. See Q4572 "Opening
Applications, Documents, Folders, Shortcuts, or Web Pages from
CitectSCADA" for an alternate method that does not require knowing
the application path and name.
Example:
To open an Excel data file “Test.xls” located in “C:\Documents and
Settings\User01\My documents\”, using “Excel.exe” located in
“C:\Program Files\Office\Office10\”, you will have to use the
Exec(Command, Mode) function in the following manner:
Exec(“C:\Program Files\Office\Office10\Excel.exe C:\Documents and
Settings\User01\My documents\Test.xls”,1)
Note that specifying a mode value is very important. You may not
get successful results if the mode value is not
specified.
|