Skip to main content
August 29, 2012
Question

Text range Selection problem

  • August 29, 2012
  • 1 reply
  • 662 views

Hi

I want to select some text in a textframe.

I am using this method

textFrame.characters.itemByRange(n,m).select();

but characters.ItemByRange();

give error member not found if I am using long Integer as a parameter in this.

for example my text is AdobeIndesign and i want to select Indesign in AdobeIndesign.

characters.ItemByRange(6,13);

How use characters.ItemByRange() to select text.

or there is another method to select a text range.

How use character or String type parameter in characters.ItemByRange()

Thanks.

This topic has been closed for replies.

1 reply

Community Expert
August 31, 2012

Use the following code to select the text

app.select(textFrame.characters.itemByRange(n,m))

Your code was causing problems because the "itemByRange" returns an array of characters and an array does not have a "select" method hence the error "member not found".

Manan Joshi

- Efficient InDesign Solutions

-MetaDesign Solutions

http://metadesignsolutions.com/services/indesign-development.php

-Manan