Navigation:  Advanced Topics (click to see list) > Working With Macros >

    Time Logger Macro Functions

Top  Previous  Next

Here is a brief description of each of Time Logger's macro functions:

long GetMajorVersion();

Returns the Time Logger major version number

long GetMinorVersion();

Returns the Time Logger minor version number

long GetFixVersion();

Returns the Time Logger fix version number

VARIANT GetSQL();

Returns the current SQL command.  For more on SQL, and links to SQL resources, please visit the SQL page on our web site, http://www.ResponsiveSoftware.com/sql.htm.

long SetSQL(BSTR SQLCommand);

Sets the SQL command.  For more on SQL, and links to SQL resources, please visit the SQL page on our web site, http://www.ResponsiveSoftware.com/sql.htm.

long OpenFile(BSTR FileName);

Opens a Time Logger database

long MoveFirst();

Moves to the first record in the database

long MoveNext();

Moves to the next record in the database

VARIANT GetFieldValue(long FieldNumber, long* ResultCode);

Returns the value of a given field.  If successful, the ResultCode will be zero.

long Show();

Add this function to your macro if you want Time Logger's main window to be displayed.  Otherwise, when running a Time Logger macro from another application, Time Logger's window will not be visible.

long GetNumRecords();

Returns the number of records in the currently opened database

long SetFieldValue(long FieldNumber, VARIANT Value);

Sets the value of a specific field

long DeleteRecord();

Deletes the current record

long ImportData(BSTR FileName);

Imports data from the given text file.  The fields expected will be those last set when choose File/Import/From a Text File.

long ExportData(BSTR FileName);

Exports the data as it would be exported if you had chosen File/Export/To a Text File.

long SaveAs(BSTR FileName);

Saves a copy of the current database with a new name.

long SetReportTitle(BSTR NewTitle);

Sets the text of the report title (as if you had changed it in the Tools/User Options/Printing window.

long PrintReport();

Prints a time report

long PrintInvoice(BSTR ClientName);

Prints an invoice for the given client.

long RefreshDisplay();

Refreshes the time record list.