please find attached my code.
The code allows me to access and login to an internal database, where I now want to create a Report in .xls-file format (Button is available but without id/name to access).
Have you any ideas on how I can access this button ? I uploaded a screen of the HTML code below.
Code:
' Add reference to Microsoft Internet Controls (SHDocVw)
' Add reference to Microsoft HTML Object Library
Sub InternetExplorerSteuern()
Dim IEApp As Object
Dim IEDocument As Object
Dim doc As MSHTML.HTMLDocument
Dim div As HTMLDivElement
Set IEApp = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}")
IEApp.Visible = True
IEApp.Navigate "Browser-page"
Do: Loop Until IEApp.Busy = False
Set IEDocument = IEApp.document
IEDocument.getElementById("sap-user").Value = "user-name"
IEDocument.getElementById("sap-password").Value = "password"
IEDocument.getElementById("b1").Click
IE.document.parentWindow.execScript "Launch Tracker U8 / MaxLines: 100(document.Click);"
Do: Loop Until IEDocument.ReadyState = "complete"
End Sub
Screen:
with Button-properties
Best Wishes
Joshua