SBendBuckeye
Programmer
Client has mainframe based system that allows external objects if invoked via an ActiveX control (eg start Word or Excel, manipulate them, etc). To make the system as general as possible and because the mainframe system doesn't allow object storing, I always instantiate with the objects' application and then check using it GetObject and then CreateObject if an error occurs.
Most of the time the system just opens an application and uses its document file as a work area without ever saving it back out (eg Book1, Document1, etc) because they have better graphics or whatever.
Since many of them are visible and allow user interaction as part of the process, what is the best way to ensure I have the correct instance the next time I use GetObject?
I have thought about using the Registry but that seems like a lot of overhead. Also, hWnd could be used or maybe one of the obscure BuiltInProperties that are rarely used. Or I could just save the document to a temporay folder and kill when I'm done but all of these have potential pitfalls.
Any ideas out there about what is the best way to accomplish this task? Maybe I'm making this to be too big of a deal since noone else seems to care, but the chances of getting incorrect data without an error being raised bugs me.
Thanks in advance for any help and or suggestions you have!
Have a great day!
j2consulting@yahoo.com
Most of the time the system just opens an application and uses its document file as a work area without ever saving it back out (eg Book1, Document1, etc) because they have better graphics or whatever.
Since many of them are visible and allow user interaction as part of the process, what is the best way to ensure I have the correct instance the next time I use GetObject?
I have thought about using the Registry but that seems like a lot of overhead. Also, hWnd could be used or maybe one of the obscure BuiltInProperties that are rarely used. Or I could just save the document to a temporay folder and kill when I'm done but all of these have potential pitfalls.
Any ideas out there about what is the best way to accomplish this task? Maybe I'm making this to be too big of a deal since noone else seems to care, but the chances of getting incorrect data without an error being raised bugs me.
Thanks in advance for any help and or suggestions you have!
Have a great day!
j2consulting@yahoo.com