lohriialo / indesign-scripting-python

Scripting in InDesign is used to automate a wide variety of repetative task or as complex as an entire new feature
145 stars 26 forks source link

direct script vs python problem #11

Closed dummerfranz closed 3 years ago

dummerfranz commented 3 years ago

can someone explain to me why this script isnt working in python3? In InDesign this script is working just fine...

import win32com.client
app = win32com.client.Dispatch('InDesign.Application')
app.activeDocument.dataMergeProperties.selectDataSource('C:/Users/test.csv')

console output: Missing required parameter "DataSourceFile" for method "SelectDataSource".', None, 0, 0), None)

tried to apply but isnt working this way:

test=app.activeDocument.dataMergeProperties.selectDataSource(DataSourceFile="C:/Users/g.overbeck/Desktop/python/tsptoolexp/flyer/input.csv")

lohriialo commented 3 years ago

method names should be start with an upper-case as can be seen from api_reference

dummerfranz commented 3 years ago

Thanks for your reply.