none
Outlook vba - IE Automation can't get click to work RRS feed

  • Question

  • Hi,

    So i'm just getting started with Outlook automation and I'm trying to log into a website and update some pages.  What I can't get to work at the moment is the clicking of the submit button.

    Here is the source from the target site;


    <hr>
    <input type="submit" name="login" value="Login" class="primary" tabindex="4" />
    <label for="country">Country:</label>

    and this is the code am I using;

    Set ElementCol = objie.Document.getElementsByTagName("submit")
     
    ' loop through all 'input' elements and find the one with the value "Submit"
    For Each btnInput In ElementCol
        If btnInput.Value = "login" Then
            btnInput.Click
            Exit For
        End If
    Next btnInput

    Nothing happens.  The web page just sits there and after a couple of seconds the fields I have populated (username/password) and cleared.

    Any help greatly appreciated.

    Nathan


    Friday, July 12, 2013 10:48 AM

Answers