Hi @j_kleijnjansY73VU. The error is saying that it does not recognize the "m_inventorApplication" variable you are trying to use. That local variable is supposed to be 'declared' at the Class level, at same level as the Sub routine which you are trying to use that variable within, or at a higher level, so that you can access it from within all the Sub/Function routines defined within that Class. It is supposed to represent the Inventor.Application object. If you already have a local variable which represents an instance of the Inventor.Application object, but it is spelled differently, then use that variable there instead.
Also, when you know you are working with a DrawingDocument, instead of some other type of Inventor Document, then you could be working with the DrawingPrintManager type, instead of the regular PrintManager type. The DrawingPrintManager is a type that is derived from the PrintManager type, and is obviously specific for drawings, and has a lot more properties and methods available to it, that are unique to drawings.
Wesley Crihfield

(Not an Autodesk Employee)