Skip to main content

I'm evaluating the trial version of Reflection Desktop 16 and I'm running into an error on a VBA procedure. The procedure uses the Legacy.Printing.PrintToFile method and appears to properly declare and set the dll at the top of the procedure:

Dim Legacy as Object

Set Legacy = CreateObject("Attachmate.Reflection.Objects.Emulation.OpenSystems.dll")
Legacy.Connect = ""

The dll is present in the file path shown in the references. When I attempt to run the macro, I get a "run-time error 429, ActiveX component can't create object". Some sites I'm searching regarding this error mention that sometimes the application must be registered before the class will function properly. Would I be getting this error because I'm using a trial version of Reflection?

Jack


#Desktop
#Reflection

I'm evaluating the trial version of Reflection Desktop 16 and I'm running into an error on a VBA procedure. The procedure uses the Legacy.Printing.PrintToFile method and appears to properly declare and set the dll at the top of the procedure:

Dim Legacy as Object

Set Legacy = CreateObject("Attachmate.Reflection.Objects.Emulation.OpenSystems.dll")
Legacy.Connect = ""

The dll is present in the file path shown in the references. When I attempt to run the macro, I get a "run-time error 429, ActiveX component can't create object". Some sites I'm searching regarding this error mention that sometimes the application must be registered before the class will function properly. Would I be getting this error because I'm using a trial version of Reflection?

Jack


#Desktop
#Reflection
grayfox5;2446513 wrote:
I'm evaluating the trial version of Reflection Desktop 16 and I'm running into an error on a VBA procedure. The procedure uses the Legacy.Printing.PrintToFile method and appears to properly declare and set the dll at the top of the procedure:

Dim Legacy as Object

Set Legacy = CreateObject("Attachmate.Reflection.Objects.Emulation.OpenSystems.dll")
Legacy.Connect = ""

The dll is present in the file path shown in the references. When I attempt to run the macro, I get a "run-time error 429, ActiveX component can't create object". Some sites I'm searching regarding this error mention that sometimes the application must be registered before the class will function properly. Would I be getting this error because I'm using a trial version of Reflection?

Jack


Sorry, this was actually from an early script I was attempting to write while evaluating the software. What I'm trying to do is use the .PrinterLogging = True and .PrintToFile methods I was able to use in Reflection 10. I can run my old macros as legacy macros, but I would like to use these methods for macros I'm writing currently. I'm not sure what I need to set in the references and how to declare and set the object in order to do that.

grayfox5;2446513 wrote:
I'm evaluating the trial version of Reflection Desktop 16 and I'm running into an error on a VBA procedure. The procedure uses the Legacy.Printing.PrintToFile method and appears to properly declare and set the dll at the top of the procedure:

Dim Legacy as Object

Set Legacy = CreateObject("Attachmate.Reflection.Objects.Emulation.OpenSystems.dll")
Legacy.Connect = ""

The dll is present in the file path shown in the references. When I attempt to run the macro, I get a "run-time error 429, ActiveX component can't create object". Some sites I'm searching regarding this error mention that sometimes the application must be registered before the class will function properly. Would I be getting this error because I'm using a trial version of Reflection?

Jack


Sorry, this was actually from an early script I was attempting to write while evaluating the software. What I'm trying to do is use the .PrinterLogging = True and .PrintToFile methods I was able to use in Reflection 10. I can run my old macros as legacy macros, but I would like to use these methods for macros I'm writing currently. I'm not sure what I need to set in the references and how to declare and set the object in order to do that.
I was going about this the wrong way. After contacting support, it turns out that the PrinterLogging and PrintToFile properties are members of the ThisScreen object: ThisScreen.ScreenPrinting.PrinterLogging = True, etc. A variable needs to be declared as an object, then set as ThisScreen.ScreenPrinting. Whenever you need to use the PrinterLogging or PrintToFile properties in the script after that, you only need to enter the object name, press period, then scroll down and select the property, e.g. osPrinting.PrinterLogging = True. Everything I've tested in both properties seems to be working in print capture and printer redirection now.