This guide provides a very good overview of InDesign scripting using Python. I am able to open my document and export it to a PDF, but in addition to that I want to check if any textboxes have some overflowing text. I wanted to accomplish this using some preflight checking, but when I tried to call
myPreflight = app.PreflightProcesses.add(myDocument, myProfile)
I got the error "Missing required parameter 'TargetObject' for method 'Add'.", although according to the documentation I did provide the target object.
I would really appreciate a concrete example on how to check for overflowing text, as I am rather new to this approach. Thank you for your time!

