Use script to control Word Menus in IE5 
Author Message
 Use script to control Word Menus in IE5


I'm using VBScript on an HTML page to load a word document in a new window.
I want to be able to access the Word menu in the new window using the Word
Application CommandBars collection, but the menu I see in the IE Word window
doesn't appear in the CommandBars collection. How do I access it through
script? (sample code below)



<script language=vbscript>
function editDoc(sFilename)

 ' create the new window
 set docWindow ="myDoc.doc", "windowname",


set oWord = GetObject(, "Word.Application")

 if err.number <> 0 then
  msgbox "word is not running"
    set oWord = CreateObject("Word.Application")
  msgbox "found word already running"
 end if

 if bWordRunning then

  for i = 1 to oWord.CommandBars.count
     set oMenu = oWord.CommandBars.item(i)
    msgbox "this menu is " &

    ' this is the bit where you'd hope to see the CommandBar with all the
word web options, but you don't
end if
end function

Sun, 20 Apr 2003 16:47:32 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Use script to control Word Menus in IE5

2. Use script to control Word Menus in IE5

3. Use script to control Word Menus in IE5

4. Using Script from within ActiveX Control (scripting control???)

5. Problem in executing script to validate events of ActiveX controls in IE5.0

6. Slow Menu load on ASPX page (menu as control)

7. Changing menu language in Word/ changer la langue des menus dans Word

8. Using VBA to control IE5

9. VB Error 91 when using browser control with IE5.5

10. VB Chart control run problem using IE5.5

11. Please Ask about scripting an ActiveX control in IE5

12. Control IE5.5 modalDialog from script?


Powered by phpBB® Forum Software