silenttalk
Technical User
Hi hope someone can help me out here, I guess this is an easy correction to my code or it is not possible....
I have a fair bit of vbscript attached to an outlook custom contact form, I have a button that when clicked allows the IE DOM to navigate to a website and login, I am trying to achive the same with a webbrowser control embeded on the outlook form it navigates to the correct urls but does not populate the three fields and fails with the error code: -
Object required: WebBrowser1.document.All.Item(...)'
The code that works with the DOM is: -
Sub cmdvsp_click
Dim waitcount
Set IE = CreateObject("InternetExplorer.Application")
ie.Navigate "myURL"
IE.Visible = True
for waitcount = 1 to 13000000
next
IE.Document.All.Item("vendorname").Value = "myVendorname"
IE.Document.All.Item("username").Value = "myUsername"
IE.Document.All.Item("password").Value = "myPassword"
End Sub
The code that does not work with the WebBrowser control is: -
Sub cmdvsp_click
Dim waitcount
frame12.visible = false : frame13.visible = false : frame36.visible = false : frame29.visible = false : image1.visible = false
fullnamebutton.visible = false : phone1.visible = false : image2.visible = false : Phone1Label.visible = false
fullname.visible = false : phone1button.visible = false : WebBrowser1.visible = true : cmdback.visible = true
WebBrowser1.Navigate("myURL")
for waitcount = 1 to 13000000
next
WebBrowser1.document.All.Item("vendorname").Value = "myVendorname"
WebBrowser1.document.All.Item("username").Value = "myUsername"
WebBrowser1.document.All.Item("password").Value = "myPassword"
End Sub
All the controls are Dimensioned and set outside this Sub ie: -
Dim objControls
Set objControls = Item.GetInspector.ModifiedFormPages("General").Controls
Dim IE, WebBrowser1
Set WebBrowser1 = objControls("WebBrowser1")
any help would be extremely well received
Thanks
Silenttalk
I have a fair bit of vbscript attached to an outlook custom contact form, I have a button that when clicked allows the IE DOM to navigate to a website and login, I am trying to achive the same with a webbrowser control embeded on the outlook form it navigates to the correct urls but does not populate the three fields and fails with the error code: -
Object required: WebBrowser1.document.All.Item(...)'
The code that works with the DOM is: -
Sub cmdvsp_click
Dim waitcount
Set IE = CreateObject("InternetExplorer.Application")
ie.Navigate "myURL"
IE.Visible = True
for waitcount = 1 to 13000000
next
IE.Document.All.Item("vendorname").Value = "myVendorname"
IE.Document.All.Item("username").Value = "myUsername"
IE.Document.All.Item("password").Value = "myPassword"
End Sub
The code that does not work with the WebBrowser control is: -
Sub cmdvsp_click
Dim waitcount
frame12.visible = false : frame13.visible = false : frame36.visible = false : frame29.visible = false : image1.visible = false
fullnamebutton.visible = false : phone1.visible = false : image2.visible = false : Phone1Label.visible = false
fullname.visible = false : phone1button.visible = false : WebBrowser1.visible = true : cmdback.visible = true
WebBrowser1.Navigate("myURL")
for waitcount = 1 to 13000000
next
WebBrowser1.document.All.Item("vendorname").Value = "myVendorname"
WebBrowser1.document.All.Item("username").Value = "myUsername"
WebBrowser1.document.All.Item("password").Value = "myPassword"
End Sub
All the controls are Dimensioned and set outside this Sub ie: -
Dim objControls
Set objControls = Item.GetInspector.ModifiedFormPages("General").Controls
Dim IE, WebBrowser1
Set WebBrowser1 = objControls("WebBrowser1")
any help would be extremely well received
Thanks
Silenttalk