Applies To:
  • CitectSCADA 5.xx, 6.xx
  • CitectHMI 5.xx, 6.xx

How can I open a Word or Excel document in its appropriate application software from Citect? I am able to open the application eg. Word.exe or Excel.exe using the Exec(Command, Mode) Cicode function, but I would like to open the document in the application as well.

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.

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.


Exec(), Word, Excel, Access, Opening files from Citect