Invoke Code: Exception has been thrown by the target of an invocation(Save the work file into pdf))

Can you try to add try catch in your code so it will give you the exact exception.and also insure that microsoft is installed in your machine where you are running the code.

cheers