I know how to use *****.GetActiveObject(ProgId), however the problem is that several of the Applications I use this code line on are not added to the ROT, even if they are already open, I get an HRESULT Error. However If I click on another Application and then return to the original Application, the code line works just fine.
The reason I am leaving this so vague, is because this is a problem I am having across 10+ applications.
The reason for me not posting code is because I do not believe this problem to be code based, rather I believe this problem to be due to a simple lack of understanding on my part.
One of the Most Important Programs I am having this issue with is "Microsoft Excel". All I want to do is be able to start the user at a specific cell.
I have looked all over for a decent explanation of how to use the *****.GetActiveObject(ProgId) in Excel, however, there does not seem to be any reasonable answers. The Program may be written in c#, however, if it is simpler in visual basic that is not a problem
http://support.microsoft.com/kb/316126
Ensure another window is activated before attempting to connect. As shown in the example, you can use
Form.Activateto focus your own form, thus causing the Office app to lose focus.