How to open a browser window through Word using VBA with set height, width, and no menu bar
Frage
I basically want to open a browser window from Word using VBA that does the same as javascipt:
window.open ("http://www.google.com","mywindow","menubar=0,resizable=0,width=350,height=250");
Lösung
How about something like:
Sub window_Open(strLocation As String, Menubar As Boolean, height As Long, width As Long, resizable As Boolean)
With CreateObject("InternetExplorer.Application")
.Visible = False
.height = height
.width = width
.Menubar = Menubar
.Visible = True
.resizable = resizable
.Navigate strLocation
End With
End Sub
Sub test()
window_Open "www.google.com", True, 250, 350, False
End Sub
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow