Product Analyst

Hi

 

I’m trying to upload my products information and images to my website by filling the data from my excel sheets and the images from specific location in my pc.

I already did the following code:

Sub Autofillwebsite()

Dim i As Long
Dim IE As Object
Dim objElement As Object
Dim html As HTMLDocument

Set IE = CreateObject(“internetexplorer.application”)
IE.Visible = True

IE.navigate “http://midas.imc-digital.com/admin”

Do
DoEvents
Loop Until IE.ReadyState = 4
pagesource = IE.document.body.outerhtml
    IE.document.getElementById(“txtUsername”).Value = (“username”)
    IE.document.getElementById(“txtPassword”).Value = (“password”)
    IE.document.getElementById(“btnSave”).Click
    SendKeys “{ENTER}”

Application.Wait Now + TimeValue(“0:00:04”)

    Set AllHyperlinks = IE.document.getelementsbytagname(“A”)

    For Each hyper_link In AllHyperlinks

        If hyper_link.innerText = “Products” Then
            hyper_link.Click
            Exit For

        End If

    Next

Application.Wait Now + TimeValue(“0:00:04”)

    Set AllHyperlinks = IE.document.getelementsbytagname(“A”)

    For Each hyper_link In AllHyperlinks

        If hyper_link.innerText = “Add Product” Then
            hyper_link.Click
            Exit For

        End If

    Next

‘I reach to this point

‘ now I need to select from a drop down list in which category I will add the products then I need to go throw text boxes by copying my data from the my excel sheet.

Set IE = Nothing
Application.StatusBar = “”

    End Sub

By: os.alshoriqi

Leave a Reply

Your email address will not be published. Required fields are marked *