KBI 311214 Application Uses Microsoft Office Automation Throws An Error Message-‘Exception Has Been Thrown By The Target Of An Invocation

Version

Argent Job Scheduler all versions

Date

Wednesday, 13 May 2015

Summary

Applications that uses Microsoft Office automation shows an error message – ‘Exception has been thrown by the target of an invocation’ – when run from Argent Job Scheduler

Technical Background

Customers may receive an error message on executing applications that uses Microsoft Word, or Excel automation

Even though the application runs fine in the command line, it displays the error message – ‘Exception has been thrown by the target of an invocation’ when it runs in Argent Job Scheduler

This is because, this automation application uses a hidden GUI operation

Argent Job Scheduler expects Job that has GUI to be configured with explicit user privileges

To do this, the ‘Security’ component needs to be added to the Job and explicit user credentials must be given in the ‘Job Security’ (J20B) window as shown below

Resolution

N/A