View Single Post
 
Old 05-20-2015, 01:42 AM
saurabhlotankar saurabhlotankar is offline Windows XP Office 2010 32bit
Novice
 
Join Date: May 2015
Posts: 29
saurabhlotankar is on a distinguished road
Default Require assistance in writing code to login to webmail account.

Hi All,

I am trying to login to webmail account througha VBA macro.

Complete code is working fine except clicking on sign in button. Please assist.

My code:

Sub test()
' open IE, navigate to the desired page and loop until fully loaded
Set IE = CreateObject("InternetExplorer.Application")
my_url = "https://www.google.com"

With IE
.Visible = True
.Navigate my_url
'.Top = 50
'.Left = 530
'.Height = 400
'.Width = 400

Do Until Not IE.Busy And IE.readyState = 4
DoEvents
Loop

End With

' Input the userid and password
IE.Document.getElementById("username").Value = "*******"
IE.Document.getElementById("password").Value = "*******"

' Click the "Search" button
IE.Document.getElementByvalue("Signin").onClick

End Sub




I have also attached html code screengrab along with this msg for your reference.

Please assist
Attached Images
File Type: jpg xml code.jpg (75.8 KB, 16 views)
Reply With Quote