Skype:TextControlSupport
Orders:877-462-4772
TX Text Control - word processing components.
« »

Changing FieldTypeData of a specific field

Blogged by Björn Meyer on March 31, 2006 and tagged with Samples.

Last week, several customers called our support department, asking how to change the FieldTypeData property of an existing field using TX Text Control ActiveX.

The FieldTypeData property sets or returns the data that belongs to a marked text field of a special type, for example an external hyperlink. In this case, the property contains the URL of the hyperlink.

It is not possible to set the FieldTypeData twice, if the FieldType has not been specified again. So, the required code to change the FieldTypeData is as follows:

TXTextControl1.FieldInsert "Test"
Dim FieldId As Integer
FieldId = TXTextControl1.FieldCurrent

TXTextControl1.FieldType(FieldId) = txFieldExternalLink
TXTextControl1.FieldTypeData(FieldId) = "http://www.google.com"
MsgBox TXTextControl1.FieldTypeData(FieldId)

TXTextControl1.FieldType(FieldId) = txFieldExternalLink
TXTextControl1.FieldTypeData(FieldId) = "http://www.textcontrol.com"
MsgBox TXTextControl1.FieldTypeData(FieldId)
« Prev:Protecting parts of a document
» Next:Copying the complete content into the clipboard

Comments

If you would like to comment on this blog entry, please post a comment.

External verification page for ISO 9000:2000 certificate
ISO 9001:2000
certified