Reputation: 43
I need to fill the text field on internal site SharePoint in my company. But when I start my code, before the filling me value next error raise:
Run-time error: Automation Error, The interface is unknown
Please help
Sub Authority()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.navigate "OurInternalSite"
ie.document.getelementbyid("TextField5").Value = "My text"
End Sub
Code of button
<input data-is-interactable="true" id="ComboBox29-input" class="ms-ComboBox-Input css-93" type="text" aria-expanded="false" aria-autocomplete="inline" role="combobox" spellcheck="false" autocapitalize="off" autocomplete="off" data-lpignore="true" value="">
Upvotes: 1
Views: 64
Reputation: 84465
You haven't waited for the page to load which has likely led to this error
ie.navigate "site"
While ie.Busy Or ie.ReadyState<>4:DoEvents:Wend
The id for the input
is also
ComboBox29-input
Upvotes: 2