i've tried this for awhile now and feel as though im close just missing something. the website i'm trying to enter data into is an electronic document system and is based on a server here at work so i wont be able to send anyone a link as you wouldnt be able to access it. however i have gone through the html to find certain pieces of info i need. the site is split into 10+ frames (i believe) the frame im looking to reference is labeled "frameSearchCriteria" (both name & id) (also form name is "xForm" if thats relevant) the field i'm trying to have data input in to is "xObjectSearchId" (name). this is what i have so far, not sure how to identify the specific frame, and form if necessary. please help!
Sub Xdoc()
Dim oIE As InternetExplorer
Dim HTMLDoc As HTMLDocument
Dim frmCol As FramesCollection
Dim htmlColl As Object
Dim htmlInput As Object
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate ("http://imaging/xsuite/xapps/default.aspx")
Do While oIE.Busy: DoEvents: Loop
Do While oIE.readyState <> 4: DoEvents: Loop
oIE.Visible = True
' Go through <frame> to get to main document
Set frmCol = oIE.document.frames 'Get the frame collection
Set HTMLDoc = frmCol.Item(1).document 'Get the HTML document within the frame
Set htmlColl = HTMLDoc.getElementsByName("xObjectSearchId") 'Get the input collection from this HTML doc
For Each htmlInput In htmlColl
If htmlInput.Name = "xObjectSearchId" Then htmlInput.Value = ("4212080657")
Next htmlInput
Set oIE = Nothing
End Sub
Moderator's Note: Welcome to the forum, You have to put code tags around code. Select the codes then hit the "#"
Bookmarks