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

InDesign DataMerge: How to set "Data Source Import Options" with script?

New Here ,
Aug 28, 2015 Aug 28, 2015

Copy link to clipboard

Copied

I'm making a script for automation data merge.

I'm using the code like this - myDoc.dataMergeProperties.selectDataSource(myDataSource) - and it works good.

But I need to set Data Source Import Options (see screenshot of a dialog window) programmatically, with Script.

DataSourceImportOptions.jpg

Is it possible to do this and how?

TOPICS
Scripting

Views

359

Likes

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 ,
Aug 28, 2015 Aug 28, 2015

Copy link to clipboard

Copied

Moved to InDesign Scripting....

Likes

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
New Here ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

I would like to know the answer to this question. What page did you move to?

Likes

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
New Here ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

I was mistaken. It was a tag change, not a page move.
Either way I want this resolved. When I load a particular CSV file, it reads in ASCII encoding when it is actually Shift-JIS.

Likes

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 ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

See the textImportPreferences property on application object. It might work, I have not tested it though

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#TextImportPreference.html

-Manan

Likes

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
New Here ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

LATEST

Thanks a lot!! But, It seems not to be worked.
(textImportPreferences and DataMerge seem to be different functions..)

Since there is no critical impact, I will give this up and try to load the CSV manually.
The system for CSV is old and I will update the system in the future to export CSV in Unicode. Then the problem seems unlikely to occur.

Likes

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