Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to verify GetObject has the same document

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top