v2018.09.17
Fixed issues:
-MessageBox2 wasn't showing countdown timer. Possible cause is because the application's main form border style is SizableToolWindow.
The HCBT_ACTIVATE event message, that indicates a message box is displayed, never happens. The solution is to wait a short duration
and then enumerate all thread windows, looking for the message box window.
-The main window wouldn't appear when the notify icon is clicked. This happened when the main form was started in hidden mode by
overriding the SetCoreVisible and passing the first call value as false. It also happened when trying to use Application.Run()
instead of Application.Run(Form). Instead, what seems to work is to initially set the form's Opacity to 0, and then set back to 1
when the notify icon is clicked.
v2018.09.12
-Initial release under the BSD license.
Double-clicking or running OpenExcel.exe by itself without args, starts the single instance process that listens for OpenFile.exe -File: requests. The main window minimizes to the icon tray area. To close the program, right-click on the tray-icon and then click Exit.
All command line arguments are optional:
-File:<full path to xls filename>
-File:<relative path to filename>
-Folder:<current folder for relative filename>
Multiple -File commands can be used, or a single -File command with the pipe character separating files. Relative filenames are combined with the preceding -Folder value. The -Folder option is for convenience when opening multiple files in the same folder. Note: If no files are specified and OpenExcel is already running, then nothing is done.
E.g. OpenExcel.exe -Folder:C:\Data\ -File:Data1.xls|Data2.xls -Folder:C:\DataOther\ -File:Data3.xls
-CloseSeconds:integer default is 0, which means do not close.
E.g. OpenExcel.exe -File:C:\Data\Data1.xls -CloseSeconds:60
The specified files will be opened and then automatically closed after the specified number of seconds. The value must be greater than zero for auto-close to work.
-ShowCountDown:[true/false]
E.g. OpenExcel.exe -File:C:\Data\Data1.xls -CloseSeconds:60 -ShowCountDown
Displays a popup dialog box with a countdown until the workbooks are closed. The dialog box gives the option to close the workbooks immediately (by clicking the OK button) or to cancel closing the workbooks (by clicking the Cancel button).
-Visible:[true/false] default is false.
E.g. OpenExcel.exe -File:C:\Data\Data1.xls -CloseSeconds:60 -Visible
Displays the main window of the MS-Excel process. There are also buttons in this program's main window that allow the user to toggle the visibility of the Excel process main window.
-HideOnClose:[true/false] default is unspecified.
E.g. OpenExcel.exe -File:C:\Data\Data1.xls -CloseSeconds:60 -Visible -HideOnClose
Hides the main window of the MS-Excel process after the timeout is done. If unspecified then the window's visible state remains unchanged.
-DisplayAlerts:[true/false] default is false.
This option is passed to the Excel COM object. Set this property to False to suppress prompts and alert messages while a macro is running. If a prompt requires user input, Excel will choose the default option. If False, Excel will set this property to True after the code is finished, unless running cross-process code.
-ReadOnly:[true/false] default is false.
This option is passed to the Excel COM object. True to open the workbook in read-only mode.
-Password:text
This option is passed to the Excel COM object. The password required to decrypt the Excel file. Note: if opening multiple files, currently only one password is supported.
-WritePassword:text
This option is passed to the Excel COM object. This is required if planning on saving the workbook to the same filename.
-IgnoreReadOnlyRecommended:[true/false] default is true.
This option is passed to the Excel COM object. True to have Microsoft Excel not display the read-only recommended message (if the workbook was saved with the Read-Only Recommended option).
-Delimiter:char
This option is passed to the Excel COM object. If the file is a text file and the Format argument is 6, this argument is a string that specifies the character to be used as the delimiter. For example, use Chr(9) for tabs, use ',' for commas, use ';' for semicolons, or use a custom character. Only the first character of the string is used.
-AddToMenu:[true/false] default is false.
This option is passed to the Excel COM object. True to add this workbook to the list of recently used files.
-Editable:[true/false] default is false.
This option is passed to the Excel COM object. If the file is a Microsoft Excel 4.0 add-in, this argument is True to open the add-in so that its a visible window. If this argument is False or omitted, the add-in is opened as hidden, and it cannot be unhidden. This option doesn't apply to add-ins created in Microsoft Excel 5.0 or later. If the file is an Excel template, use True to open the specified template for editing or False to open a new workbook based on the specified template.
-Direct:[true/false] default is false.
E.g. OpenExcel.exe -File:C:\Data\Data1.xls -Direct
Direct opens the files using completely separate Excel.exe and OpenExcel processes. It will take longer to open the file(s) since a new Excel.exe instance must be started. In Direct mode, this program's main window and listener are not created. Direct is generally not needed, but could be used to ensure a fresh Excel process is started.
-Log:[path to log file] default is unspecified.
E.g. OpenExcel.exe -Log
Option to log any exceptions to a text file. If unspecified then the default log file is: \Users\username\AppData\Local\Opulos\OpenExcel\OpenExcel_<yyyyMMdd>_log.txt