SetForegroundWindow looked promising, but I don't know how to use it in JSript. Maybe there's some way I can loop through all opened windows and apply this? Per this answer, I tried using window.blur() in order to blur IE, but this will only work if the IE window is the only one opened. Of course, this will only work if no "Document1" is already opened, so this is a questionable thought to begin with. WshShell.AppActivate("Document1 - Microsoft Word") // or some other textīefore the ToolsSpelling call, but this does not do anything (maybe because the Word document is not actually revealed at this point?). I've tried var wshShell = new ActiveXObject("WScript.Shell") So my question is, how can I bring this window to the foreground? One important note is that the last line, Word.ToolsSpelling(), locks up my script, so anything I do will need to be before that. The idea is to utilize the MS Word spell check for browser use, and it works well in XP, but the spell check box opens in the background in Windows 7 / IE 8 ( this question tells me that the problem started in Vista and is probably an OS issue, not a browser or Office issue). ![]() ![]() Word.ToolsSpelling() // opens spell check behind IE Word.FileNew() // opens new Word document I have some JScript code (converted from some old VBScript) that starts like this: var Word = new ActiveXObject("Word.Basic")
0 Comments
Leave a Reply. |