I have a windows service which creates an inx file. I am trying to use InDesign to open this inx file and export it as a PDF. I use the following code in the service:
InDesign.Application app = (InDesign.Application)COMCreateObject("InDesign.Application.CS2");
app.Open(strFilename, true);
app.ActiveDocument.Export("Adobe PDF", OutputFile, false, app.PDFExportPresets["[Press Quality]"]);
app.Quit(idSaveOptions.idNo);
When the open method is called I get an exception, "Cannot handle the request because a modal dialog or alert is active."
When I run the same code from an interactive application with the same user credentials, no dialog box appears, and the export works.
Does anyone have any idea what dialog box might be active, and how I can get rid of it?
InDesign.Application app = (InDesign.Application)COMCreateObject("InDesign.Application.CS2");
app.Open(strFilename, true);
app.ActiveDocument.Export("Adobe PDF", OutputFile, false, app.PDFExportPresets["[Press Quality]"]);
app.Quit(idSaveOptions.idNo);
When the open method is called I get an exception, "Cannot handle the request because a modal dialog or alert is active."
When I run the same code from an interactive application with the same user credentials, no dialog box appears, and the export works.
Does anyone have any idea what dialog box might be active, and how I can get rid of it?