• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Converting text frames to text field using scripts - edited for brevity.

Community Beginner ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

Untitled.png

I am using Indesign cs6. I want to make interactive Pdf  using the Text Frame can convert into Text Field. I can be done manually(see above Image), but i need to make the same thing by using scripting. i don't know how to do using scripting anyone please help me.

Thanks,

[Discussion Moved to InDesign Scripting Forum by Moderator]

[Correct Answer changed by Moderator]

TOPICS
Scripting

Views

2.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 04, 2017 May 04, 2017

Hi Sangeetha,

surprisingly I found no direct method for converting a text frame or something else to a "Text Field" (in scripting terms: object textBox) by scripting. I could be wrong, but maybe the developers did not provide that when form fields were introduced.

What is working is using the menu command for this by scripting.

For that you'll need a selected object in the document to start with.

Here an ExtendScript (JavaScript) script snippet that will do this for one single item selected:

// Text

...

Votes

Translate

Translate
Advisor ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

You have posted this in the main InDesign Forum. I will move this to the InDesign Scripting Forum so that you can receive more technical help.

Best,

EW

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

Hi Sangeetha,

surprisingly I found no direct method for converting a text frame or something else to a "Text Field" (in scripting terms: object textBox) by scripting. I could be wrong, but maybe the developers did not provide that when form fields were introduced.

What is working is using the menu command for this by scripting.

For that you'll need a selected object in the document to start with.

Here an ExtendScript (JavaScript) script snippet that will do this for one single item selected:

// Text frame, rectangle, oval or polygon should be selected:

var sel = app.selection[0];

// Menu command "Convert To Text Field":

var convertToTextField = app.menuActions.itemByName("$ID/$$$/Command/TextField");

// If available:

if(convertToTextField.enabled)

{

    convertToTextField.invoke();

};

( This will not work with InDesign Server. )

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

Thank you so much

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

Sorry sangeethak65390815 - But it was Laubender​ answer that was actually correct. I just moved this to the appropriate forum.

That's certainly helpful of me to do so but not correct or fair to Laubender who has given you a very detailed and helpful answer.

Best,

EW

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

Its ok and thanks for your response 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 30, 2019 Jul 30, 2019

Copy link to clipboard

Copied

LATEST

Top,

Thank you so much

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines