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

top

Top 10 Bestselling Product Award 2007Top 25 Publisher Product Award 2007Top 10 Bestselling Product Award 2007 in JapanTop 25 Bestselling Product Award 2006Top 25 Bestselling Publisher Award 2006Reader's Choice Award, dot.net magazin, 3rd place