Personal Taxprep 2018.4.0

Notice: The information on this page is only for users of Personal Taxprep 2018. If you are using Personal Taxprep Classic 2018, consult the help available in the program.

Taxprep Development Toolkit Instructions

With the Taxprep Development Toolkit, all cells of the Taxprep program are available through an outside application. A Microsoft Excel Worksheet example is available here. This worksheet example can help you developing your own Taxprep integration.

Note: This is only an example and that there is much more that can be done using Excel or any other programming language (C++, C#, Delphi…).

Functions and Attributes Available through the COM Interface

You can access the following information through the Excel worksheet provided as an example

  • In the Visual Basic Editor, add a reference to the library using the menu option Tools\References, then select Taxprep Base COM Interfaces and press OK
  • Select the menu option View\Taxprep20YYT1Return Browser, then select the Taxprep20YYT1Return TPBaseCom from the combo box (see below)

Access to Cell Functions and Properties

These functions and properties can be used to access or modify the attributes of a cell.

Members of “IT120YYTaxprepCell”

  1. Property Choices As Variant
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    Array of strings containing the choices available for this translated string cell (using the current DataLang specified for the return) Returns the empty value if there are no choices for this cell
  2. Property Description As String
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    Description text for the cell (using the return\ MsgLang)
  3. Property HasCalc As Boolean
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    Does the cell have a default calculation?
  4. Property HasInput As Boolean
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    Does the cell have user input?
  5. Property IsEmpty As Boolean
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    Is the cell empty?
  6. Property IsOverridden As Boolean
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    Has the default calculation for this cell been overridden?
  7. Property IsProtected As Boolean
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    Can the value be altered?
  8. Property IsSelectable As Boolean
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    Is a selection dialog available for this cell?
  9. Property Name As String
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    The cell\ full name
  10. Property OwnerReturn As IT120YYTaxprepReturn
    Read-only
    Member of TPBaseCom IT120YYTaxprepCell
    The return that owns this cell
  11. Property Value As Variant
    Member of TPBaseCom IT120YYTaxprepCell
    The cell\ value (translated string cells use the return\ DataLang property). To clear the cell, provide the special variant value of Null
  12. Sub DoSelection()
    Member of TPBaseCom IT120YYTaxprepCell
    Displays a dialog with the available choices for the cell
  13. Sub RemoveOverride()
    Member of TPBaseCom IT120YYTaxprepCell
    If the cell is overridden, this method removes the overridden state and clears the cell\ value, allowing the default calculation to be restored the next time the return is calculated.

Additional Members Available in “IT120YYTaxprepCell2”

  1. Function CreateAttachedSchedule() As Boolean
    Member of TPBaseCom.IT120YYTaxprepCell2
    Creates an attached schedule for the cell. Returns true if successful. Note that function fails if the cell already has an attached schedule.
  2. Sub DeleteAttachedSchedule()
    Member of TPBaseCom.IT120YYTaxprepCell2
    The cell's attached schedule is deleted completely and the cell will no longer have an attached schedule.
  3. Function GetAttachedSchedule(out RepeatNum as Variant) As IT120YYTaxprepGroup
    Member of TPBaseCom.IT120YYTaxprepCell2
    Returns the group and the 1-based repeat number of the attached schedule for the cell.
  4. Property HasAttachedSchedule As Boolean read-only
    Member of TPBaseCom.IT120YYTaxprepCell2
    Does the cell have an attached schedule ?
  5. Sub UnlinkAttachedSchedule()
    Member of TPBaseCom.IT120YYTaxprepCell2
    The cell's attached schedule becomes an unattached schedule and the cell no longer has an attached schedule (useful if you do not want to lose the information on an attached schedule).

Access to Group Functions and Properties

These functions and properties can be used to access or modify the attributes of a logical group of cells.

Members of “ITaxprep Group”

  1. Property MaxRepeats As Long
    Read-only
    Member of TPBaseCom IT120YYTaxprepGroup
    The maximum number of repeats allowed for the group
  2. Property MinRepeats As Long
    Read-only
    Member of TPBaseCom IT120YYTaxprepGroup
    The minimum number of repeats allowed for the group
  3. Property Name As String
    Read-only
    Member of TPBaseCom IT120YYTaxprepGroup
    The full name of the group
  4. Property NumRepeats As Long
    Read-only
    Member of TPBaseCom IT120YYTaxprepGroup
    The current number of repeats for the group
  5. Function CanDeleteRepeat (Position As Long) As Boolean
    Member of TPBaseCom IT120YYTaxprepGroup
    Determines whether the specified 1-based repeat number can be deleted using DeleteRepeat. Returns true if the repeat can be deleted and false otherwise.
  6. Function CreateRepeat([NumNewRepeats As Long = 1], [Position As Long = -1]) As Boolean
    Member of TPBaseCom IT120YYTaxprepGroup
    Creates repeat(s) at the specified insertion point. The new repeats are inserted in front of the specified position (1 to NumRepeats) or at the end if the default value of 1 is used.
  7. Function DeleteRepeat(Position As Long, [NumToDelete As Long = 1]) As Boolean
    Member of TPBaseCom IT120YYTaxprepGroup
    Deletes repeat(s) at the specified position (1 to NumRepeats). If the function returns true, then all specified repeats were deleted. If the function returns false, this means that no repeats were deleted. The function could return false for a variety of reasons including if any of the parameters are invalid, if the return is read-only or if the system determines that one or more of the repeats cannot be deleted. Use CanDeleteRepeat if you need to determine in advance whether a specific repeat can be deleted.
  8. Function GetRepeatID (RepeatNum As Long) As String
    Member of TPBaseCom.IT120YYTaxprepGroup
    If you need to store a repeat number in an external file or database, it is much safer to store the ID of the repeat rather than the actual repeat number since repeats can be added and removed and the repeat numbers may not be the same the next time the taxprep return is accessed using COM. Returns an empty string if the specified 1- based RepeatNum is not valid.
  9. Function GetRepeatNumFromID(RepeatID As String) As Long
    Member of TPBaseCom.IT120YYTaxprepGroup
    Use this function to determine the current 1-based repeat number for a given RepeatID (which was likely previously obtained using GetRepeatID). Returns 1 if the specified RepeatID could not be found (for example if the repeat with the specified ID has been deleted since the RepeatID was obtained).

Licence Manager Identification

A Taxprep Integration Partner can purchase a runtime licence key that will allow COM access to a specified application even on computers for which the COM module has not been purchased/activated. This is the interface to use if you have such a runtime licence key.

  1. Function CreateNetworkManager
    Member of TPBaseCom.TTaxprepT120YYLicenceManager
    Use this method to create an TTaxprepT120YYNetworkManager if you have a Runtime Licence key to access the desired COM Taxprep20YYT1Return.
  2. Function CreateTaxReturn
    Member of TPBaseCom.TTaxprepT120YYLicenceManager
    Use this method to create an IT120YYTaxprepReturn if you have a Runtime Licence key to access the desired COM Taxprep20YYT1Return.

Network User Identification

This function provides the user ID and password required to use the appropriate user profile when creating a return.

Members of “TTaxprepT120YYNetworkManager”

  1. Function CreateReturnAsUser(NetworkUserName As String, NetworkPassword As String) As IT120YYTaxprepReturn
    Member of TPBaseCom TTaxprepT120YYNetworkManager
    If you use the Network version of the application, use this function to create a return as a specific user. This ensures that the settings for the specified user (including the tax preparer profiles and rates tables) are used for the return

Access to Return Functions and Properties

These functions and properties can be used to open, save, calculate a return, set and get cell values…

Members of “IT120YYTaxprepReturn”

  1. Property DataLang As LanguagesEnum
    Member of TPBaseCom IT120YYTaxprepReturn
    Language used for translated string cells when using GetCellValue and SetCellValue (Default: tpLangEnglish)
  2. Property DataLocked As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    Specfies whether to prevent data from being altered in the return
  3. Property IntCellVarType As IntCellTypeEnum
    Member of TPBaseCom IT120YYTaxprepReturn
    This property is used to control the type of COM variant value obtained when gettin g the value of an Integer cell, which is an Int64 internally. If not specified, the default is the DECIMAL type
  4. Property LogMethod As LogMethodEnum
    Member of TPBaseCom IT120YYTaxprepReturn
    Specifies how cell error and warning messages are provided. Default: lmMsgBox
  5. Property MsgLang As LanguagesEnum
    Member of TPBaseCom IT120YYTaxprepReturn
    Language that should be used in messages and dialog boxes. Default: TpLangEnglish
  6. Property NullForEmptyCells As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    When the tax cell is empty, this property controls whether GetCellValue returns the "zero" value for the cell (false for booleans, 0 for numerics, etc ) or whether it returns the speical NULL variant value Default: False
  7. Property NumDependents As Long
    Read-only
    Member of TPBaseCom IT120YYTaxprepReturn
    Number of dependent returns
  8. Property NumLogMessages As Long
    Read-only
    Member of TPBaseCom IT120YYTaxprepReturn
    The number of messages in the log
  9. Property PasswordProtected As Boolean
    Read-only
    Member of TPBaseCom IT120YYTaxprepReturn
    Is this data file protected by a password?
  10. Property UseDecimalForCurrency As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    When getting values for monetary cells, the variant returned containing the value is normally a Currency. If your programming environment does not support the Currency type, set this property to true to get the value as a Decimal instead
  11. Sub Browse()
    Member of TPBaseCom IT120YYTaxprepReturn
    Browse the groups, cells and available short cell names for the return in an Explorer-like window
  12. Sub BrowseAllCellNames()
    Member of TPBaseCom IT120YYTaxprepReturn
    Browse all possible cell names in all possible groups (this differs from Browse in that this function browses an empty return and this function includes at least one copy of every possible group so that you can see every possible cell name)
  13. Sub Calculate()
    Member of TPBaseCom IT120YYTaxprepReturn
    Calculate the return
  14. Function ChangePassword(OldPassword As String, NewPassword As String) As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    Changes the password for the client file to the desired value. You require the existing password to do this Returns false if the client file has a password and it does not match the CurrentPassword parameter
  15. Sub ClearMessageLog()
    Member of TPBaseCom IT120YYTaxprepReturn
    Empties the message log
  16. Function GetCell(CellName As String, [CreateRepeats As Boolean = False], [MsgOnFail As Boolean = True]) As IT120YYTaxprepCell
    Member of TPBaseCom IT120YYTaxprepReturn
    Get a cell
  17. Function GetCellDescription(CellName As String) As String
    Member of TPBaseCom IT120YYTaxprepReturn
    Returns the cell description (if available) using the current MsgLang The function will still succeed if the CellName contains repeat numbers that don’t exist yet in this return
  18. Function GetCellValue(CellName As String)
    Member of TPBaseCom IT120YYTaxprepReturn
    Get value of a cell (translated string cells use the DataLang property)
  19. Function GetDependentReturn(DepNum As Long) As IT120YYTaxprepReturn
    Member of TPBaseCom IT120YYTaxprepReturn
    Get dependent return (index from 1 to NumDependents)
  20. Function GetGroup(GroupName As String, [CreateRepeats As Boolean = False], [MsgOnFail As Boolean = True]) As IT120YYTaxprepGroup
    Member of TPBaseCom IT120YYTaxprepReturn
    Get a cell group
  21. Function GetSpouseReturn() As IT120YYTaxprepReturn
    Member of TPBaseCom IT120YYTaxprepReturn
    Get the spouse return
  22. Function Open(FileName As String, [Password As String]) As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    Open a tax return file If an empty string is provided as the FileName, a standard File/Open dialog is presented
  23. Function RemovePassword(CurrentPassword As String) As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    Removes the password from the client file You require the existing password to do this Returns false if the client file has a password and it does not match the CurrentPassword parameter
  24. Function Save() As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    Save the return to same file For new returns, a standard File/Save dialog is presented
  25. Function SaveAs(FileName As String) As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    Save the return to a new file. If an empty string is provided as the FileName, a standard File/Save dialog is presented
  26. Sub SaveMessageLog(FileName As String, [ClearAfter As Boolean = False])
    Member of TPBaseCom IT120YYTaxprepReturn
    Save message log to a text file with option to clear the log afterwards
  27. Function SetCellValue(CellName As String, Value, [CreateRepeats As Boolean = True]) As Boolean
    Member of TPBaseCom IT120YYTaxprepReturn
    Set the value of a cell (translated string cells use the DataLang property) To clear the cell, provide the special variant value of Null
  28. Sub ShowMessageLog()
    Member of TPBaseCom IT120YYTaxprepReturn
    Shows the messages in the log in a dialog box with option to save to a text file

Additional Members Available in “IT120YYTaxprepReturn2”

  1. Function GetRepeatFromRepeatID(RepeatID As String, out RepeatNum As Variant)
    As IT120YYTaxprepGroup

    Member of TPBaseCom IT120YYTaxprepReturn2
    Find the group/repeat in the tax return that has the specified RepeatID. Will return an empty variant if the specified RepeatID cannot be found (for example, the repeat may have been deleted since the RepeatID was obtained). If the repeat is found, the 1-based repeat number of the repeat is returned in the RepeatNum output parameter.

Additional Members Available in “IT120YYTaxprepReturn3”

  1. Sub CloseFileHandle()
    Member of TPBaseCom.IT120YYTaxprepReturn3
    When working with TaxprepReturn Taxprep20YYT1Returns under .NET, there can be a significant delay before the .NET garbage collector releases the COM Taxprep20YYT1Return, even after there are no further references on the Taxprep20YYT1Return. This can result in a tax return file remaining locked by the COM Taxprep20YYT1Return after it is no longer in use, preventing other users from working with the file. To solve this problem, you can use the .NET method "ReleaseComTaxprep20YYT1Return" to force the final cleanup of the COM Taxprep20YYT1Return or you can use this method to release the open file handle. If you use this method, we assume that you are done with the file and you will no longer be able to use the Save method.
  2. Function GetAttachedSchedule(Index As Long, out RepeatNum As Variant, out Cell As Variant) As IT120YYTaxprepGroup
    Member of TPBaseCom.IT120YYTaxprepReturn3
    Obtains the group and 1-based repeat number of the desired attached schedule. Also provides the cell to which the schedule is attached. Index must be in the range 1 to NumAttachedSchedules.
  3. Property NumAttachedSchedules As Long
    read-only
    Member of TPBaseCom.IT120YYTaxprepReturn3
    The number of schedules attached to cells in the return.

Additional Members Available in “ITaxprepT1Support”

  1. Function GetDepIndexForFAMSlip(FamSlipRepNum As Long) As Long
    Member of TPBaseCom.ITaxprepT1Support
    Returns the 1-based index of the dependent return (for use with IT120YYTaxprepReturn.GetDependentReturn) associated with the specified 1-based repeat number of the FAM form. Returns -1 if there is no return associated with the specified repeat of the FAM form.

Cell Type Options

Enum IntCellTypeEnum

Member of TPBaseCom

Used to specify the type of Variant returned when obtaining the value of an Integer cell (which is an Int64 internally)

Members of IntCellTypeEnum

  1. Const IntCellVarDecimal = 0
    Member of TPBaseCom IntCellTypeEnum
    This is the default The Int64 value of the integer cell is returned as a 12-byte DECIMAL variant which can represent an Int64 precisely The DECIMAL type is supported in all versions of Windows and recognized by a variety of programming languages, including Visual Basic 6 0
  2. Const IntCellVarDouble = 2
    Member of TPBaseCom IntCellTypeEnum
    The Int64 value of the integer cell is returned as a DOUBLE variant value. Note that the DOUBLE subtype of the COM variant cannot represent large Int64 values precisely. You should therefore use this option only if the data types supported by your programming language don't give you any other choice
  3. Const IntCellVarInt64 = 1
    Member of TPBaseCom IntCellTypeEnum
    The Int64 value of the integer cell is returned as an INT64 variant value. Note that the INT64 subtype of the COM variant was not part of the original COM specification is there not supported by all versions of Windows This option is useful if you are using a NET programming language since they support Int64 directly within the language

Language Options

Enum LanguagesEnum

Member of TPBaseCom

Used to specify languages for various functions

Members of LanguagesEnum

  1. Const tpLangEnglish = 0
    Member of TPBaseCom LanguagesEnum
    Used to specify English in the SetCellValue and GetCellValue functions
  2. Const tpLangFrench = 1
    Member of TPBaseCom LanguagesEnum
    Used to specify French in the SetCellValue and GetCellValue functions

Logging Options

Enum LogMethodEnum

Member of TPBaseCom

The various ways that error and warning messages can be provided

Members of LogMethodEnum

  1. Const lmIgnore = 3
    Member of TPBaseCom LogMethodEnum
    Error and warning messages are discarded. Pay attention to the return value from SetCellValue so that you can provide your own feedback.
  2. Const lmLogged = 1
    Member of TPBaseCom LogMethodEnum
    Error and warning messages are added to the message log which can be viewed with ShowMessageLog.
  3. Const lmMsgBox = 0
    Member of TPBaseCom LogMethodEnum
    Error and warning messages are shown in a Message Box immediately
  4. Const lmMsgBoxAndLog = 2
    Member of TPBaseCom LogMethodEnum
    Error and warning messages are shown in a Message Box immediately and also added to the log