Thanks smercurio,
You are confirming the path that I was following. Here are more details.
smercurio_fc wrote:
Doesn't setting the "Visible" property bring the app to the front? No... I placed it in two locations, and it didn't help.. Here is the scenario. LV populates a blank ms word document. The document is up-front until graphs are placed into the document. Trying to bring the document up-front again has been an exercise in futility..
If not (wouldn't be too surprising given the reliability of MS apps), Not surprising at all. I'm impressed every time ms xp starts up in the morning. I am converting to MACs. I hope there will be many followers.. 😉
you can use the lvwutil functions to bring the window to the front. I will try that. Alternatively, I may try minimizing the LV Front Panel until the application detects that word has been closed.
As far as keeping it in the front, I'm not sure I understand. Are you saying you don't want the user to be able to change to another application like opening Notepad, or something? Only word will be opened on the PC during the test. So LV will be running, and word when a report is generated. Opening (and monitoring) other applications is beyond the scope of this project.. at this time.. 🙂
The ActiveX interface for Word allows you to register a callback for the "Quit" event. Yes... This is where I got stuck. I need to understand this application event a bit better. I will swap my code with the one you rcreated and see if windoze or word is intelligent enough to trigger such an event. I'm not a betting man, and I would never bet on anything that gate's boys will code.. The last ms product that impressed me was DOS 3.2. Ok... Win-2000 was respectable. I'll stop here.. 😄
However, I could not get this to work. LOL!! LOL!! 😄 no comments.. LOL!! ***shaking my head while laughing***
Please refer to my earlier statement regarding the reliability of MS apps. LOL!! LOL!! 😄 no comments.. LOL!! ***shaking my head while laughing***
I did, however, get it to work using .NET. Aiye caramba!!! Is it just me or is this getting complicated for such as a simple task?? I need a MonsterEnergy drink.. Not sure if they sell them in Canada.
Attached is an example that just displays a dialog when Word is quit. Thanks! It looks very much like what I was implementing, but didn't work..
Note that you need to install the Primary Interop Assemblies to allow the interface between .NET and Office apps to work. Maybe this is the problem.. I will need to check to see if the client can garantee that this will be installed on the target PC. As I said, is this getting complicated for such as a simple task?? I will check to see if I installed it. I have office 2000 installed on this PC. I do have office 2003 {will switch to Open Office.. office 2007 is not compatible with earlier versions unless you download a patch for older versions. So much for a standardized world! You'd think that in 2007 Engineers would have some sense of standardization? oh... I forgot... msuff doesn't really design anything... just hack and get people to buy more memory. My bad.. 😞 Sorry to drift.. Probably remind you of Ben!! LOL!!! 😄 LOL!!!!! LOL!!! 😄 I'm getting myself into trouble, aren't I?}
See an example
here. If you have Office 2003 all you need to do is re-run the installer, select "customized" options and select ".NET programmability" support (or something to that effect) for Word. See attached pic.
I can't remember if office 2000 had dot net back then. Oh well.. I may just have to upgrade word.. --- sigh -- I hate installing newer versions over stuff that works.. Especially msuff products..
There is an alternative to a all of the above.. That would be to create a pdf document and simply close word. Then monitor the opened pdf display... But that's another ball of wax. 😄
So, in order to use the "Quit" callback event, do I have to install the dot Net programmability (in the target app)? I guess, the answer is "no", but if it doesn't work, not installing it does not help.. thus pushing the answer to "yes"... -- sigh --
I will try a few things and report back.
RayR