I have an AppleScript that is automating a data merge. It's merging a single record, exporting, then emailing the exported PDF. The script works just fine.
The problem is that every so often, the merged document gives Missing Fonts window, despite the user interaction level being set to never interact.
This results in 'Cannot handle the request because a modal dialog or alert is active' and breaks my script.
tell application "Adobe InDesign CC 2019"
set user interaction level of script preferences to never interact
set myDoc to open docPath
set dataMerge to data merge 1 of myDocument
select data source of myDoc data source file csvPath
update data source
tell data merge properties of myDoc
tell data merge preferences
set record number to targetRecord
merge records -- < Missing < Fonts < Window < Pops < Up
set mergedDoc to the front document
export format PDF type to pdfPath using pdfExport without showing options
close saving no
Does anyone know why the Missing Font window would show despite setting the user interaction level to never interact? Is this a bug?
Edit: Eliminating the Document fonts folder avoids the missing fonts window. It seems when you perform a merge, because the merged document is not saved, it no longer references the Document fonts folder, and looks to system fonts. If you have conflicting fonts (like the font in the folder is TTF, but you have OTF installed), the Missing Fonts window will appear. Just have the source document using fonts installed on the system instead of fonts in the folder, and the merge will have no missing fonts.
I still think it's a bug though, never interact should mean NEVER interact.