Avis : L’information contenue dans cette page s’adresse uniquement aux utilisateurs de Taxprep des particuliers 2018. Si vous utilisez Taxprep des particuliers Édition classique 2018, nous vous invitons à consulter l’aide offerte dans le logiciel. |
Taxprep Development Toolkit Instructions
Cette page est en cours de traduction. Elle sera mise à jour dès que son contenu sera disponible en français.
With the Taxprep Development Toolkit, all cells of the Taxprep program are available through
an outside application.
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”
- 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 - Property Description As String
Read-only
Member of TPBaseCom IT120YYTaxprepCell
Description text for the cell (using the return\ MsgLang) - Property HasCalc As Boolean
Read-only
Member of TPBaseCom IT120YYTaxprepCell
Does the cell have a default calculation? - Property HasInput As Boolean
Read-only
Member of TPBaseCom IT120YYTaxprepCell
Does the cell have user input? - Property IsEmpty As Boolean
Read-only
Member of TPBaseCom IT120YYTaxprepCell
Is the cell empty? - Property IsOverridden As Boolean
Read-only
Member of TPBaseCom IT120YYTaxprepCell
Has the default calculation for this cell been overridden? - Property IsProtected As Boolean
Read-only
Member of TPBaseCom IT120YYTaxprepCell
Can the value be altered? - Property IsSelectable As Boolean
Read-only
Member of TPBaseCom IT120YYTaxprepCell
Is a selection dialog available for this cell? - Property Name As String
Read-only
Member of TPBaseCom IT120YYTaxprepCell
The cell\ full name - Property OwnerReturn As IT120YYTaxprepReturn
Read-only
Member of TPBaseCom IT120YYTaxprepCell
The return that owns this cellde - 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 - Sub DoSelection()
Member of TPBaseCom IT120YYTaxprepCell
Displays a dialog with the available choices for the cell - 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”
- 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. - Sub DeleteAttachedSchedule()
Member of TPBaseCom.IT120YYTaxprepCell2
The cell's attached schedule is deleted completely and the cell will no longer have an attached schedule. - 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. - Property HasAttachedSchedule As Boolean read-only
Member of TPBaseCom.IT120YYTaxprepCell2
Does the cell have an attached schedule ? - 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”
- Property MaxRepeats As Long
Read-only
Member of TPBaseCom IT120YYTaxprepGroup
The maximum number of repeats allowed for the group - Property MinRepeats As Long
Read-only
Member of TPBaseCom IT120YYTaxprepGroup
The minimum number of repeats allowed for the group - Property Name As String
Read-only
Member of TPBaseCom IT120YYTaxprepGroup
The full name of the group - Property NumRepeats As Long
Read-only
Member of TPBaseCom IT120YYTaxprepGroup
The current number of repeats for the group - 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. - 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. - 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. - 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. - 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.
- 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. - 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”
- 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”
- Property DataLang As LanguagesEnum
Member of TPBaseCom IT120YYTaxprepReturn
Language used for translated string cells when using GetCellValue and SetCellValue (Default: tpLangEnglish) - Property DataLocked As Boolean
Member of TPBaseCom IT120YYTaxprepReturn
Specfies whether to prevent data from being altered in the return - Property IntCellVarType As IntCellTypeEnum
Member of TPBaseCom IT120YYTaxprepReturn
This property is used to control the type of COM variant value obtained when getting the value of an Integer cell, which is an Int64 internally. If not specified, the default is the DECIMAL type - Property LogMethod As LogMethodEnum
Member of TPBaseCom IT120YYTaxprepReturn
Specifies how cell error and warning messages are provided. Default: lmMsgBox - Property MsgLang As LanguagesEnum
Member of TPBaseCom IT120YYTaxprepReturn
Language that should be used in messages and dialog boxes. Default: TpLangEnglish - 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 - Property NumDependents As Long
Read-only
Member of TPBaseCom IT120YYTaxprepReturn
Number of dependent returns - Property NumLogMessages As Long
Read-only
Member of TPBaseCom IT120YYTaxprepReturn
The number of messages in the log - Property PasswordProtected As Boolean
Read-only
Member of TPBaseCom IT120YYTaxprepReturn
Is this data file protected by a password? - 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 - Sub Browse()
Member of TPBaseCom IT120YYTaxprepReturn
Browse the groups, cells and available short cell names for the return in an Explorer-like window - 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) - Sub Calculate()
Member of TPBaseCom IT120YYTaxprepReturn
Calculate the return - 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 - Sub ClearMessageLog()
Member of TPBaseCom IT120YYTaxprepReturn
Empties the message log - Function GetCell(CellName As String, [CreateRepeats As Boolean = False], [MsgOnFail As Boolean = True]) As IT120YYTaxprepCell
Member of TPBaseCom IT120YYTaxprepReturn
Get a cell - 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 - Function GetCellValue(CellName As String)
Member of TPBaseCom IT120YYTaxprepReturn
Get value of a cell (translated string cells use the DataLang property) - Function GetDependentReturn(DepNum As Long) As IT120YYTaxprepReturn
Member of TPBaseCom IT120YYTaxprepReturn
Get dependent return (index from 1 to NumDependents) - Function GetGroup(GroupName As String, [CreateRepeats As Boolean = False], [MsgOnFail As Boolean = True]) As IT120YYTaxprepGroup
Member of TPBaseCom IT120YYTaxprepReturn
Get a cell group - Function GetSpouseReturn() As IT120YYTaxprepReturn
Member of TPBaseCom IT120YYTaxprepReturn
Get the spouse return - 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 - 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 - Function Save() As Boolean
Member of TPBaseCom IT120YYTaxprepReturn
Save the return to same file For new returns, a standard File/Save dialog is presented - 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 - 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 - 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 - 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”
- 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”
- 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. - 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. - 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”
- 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
- 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 - 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 - 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
- Const tpLangEnglish = 0
Member of TPBaseCom LanguagesEnum
Used to specify English in the SetCellValue and GetCellValue functions - 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
- 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. - Const lmLogged = 1
Member of TPBaseCom LogMethodEnum
Error and warning messages are added to the message log which can be viewed with ShowMessageLog. - Const lmMsgBox = 0
Member of TPBaseCom LogMethodEnum
Error and warning messages are shown in a Message Box immediately - Const lmMsgBoxAndLog = 2
Member of TPBaseCom LogMethodEnum
Error and warning messages are shown in a Message Box immediately and also added to the log