TerSetHtnObject
Pass an HTML Add-on object to TE.
bool TerSetHtnObject(htn)
object htn; | Htn object |
Description: Normally TE automatically creates an instance of Htn class if HTN24.Dll file is installed. However, you can use this function to override the Htn object created by the editor. This is useful when you need to call Htn methods (such as HtsSetFlags) prior to doing import or export from TE.
Example:
First create an Htn objec:
using SubSystems.TE; // namespace containing TE methods - C# syntax
using SubSystems.HT; // namespace containing Htn methods
Imports SubSystems.TE ' VBN syntax
Imports SubSystems.HT ' VBN syntax
HTN htn1=new Htn(tern1) // pass the Tern class object to bind to the
new Htn object// set the license key. The license key for HTML Add-on is e-mailed to you after your order for HTML Add-on is processed.
Htn.HtsSetLicenseKey(xxxx-yyyy-zzzz)
// Now call any Htn method needed. Example:
htn1.HtsSetFlags(True, hc.HFLAG_NO_FONT)
// Now pass the Htn object to TE.
tern1.TerSetHtnObject(htn1)
Now TE can use this Htn object to do import or export of HTML data using the SAVE_HTML and TFLAG4_HTML_INPUT flags.
Return Value: This function returns true if successful.