+ Reply to Thread
Results 1 to 5 of 5

Thread: fields filling issue

  1. #1
    Registered User
    Join Date
    03-23-2011
    Location
    spain
    MS-Off Ver
    Excel 2003/2007
    Posts
    30

    Question fields filling issue

    Hello guys,

    I am using below script to login to gmail from excel.

    If i use below code by changing bold script line with http:// mail.yahoo.com to login for yahoo when window open,its not filling fields of id,password and not hitting the sigh in button.

    Whereas if i login through same script written below for gmail then it works excellent.

    Kindly assit me how i can resolve it?

    Thanks in advance.

    Private Sub LaunchGamil(username As String, password As String)
     Const strURL_c As String = "http://mail.gmail.com"
        Dim objIE As SHDocVw.InternetExplorer
        Dim ieDoc As MSHTML.HTMLDocument
        Dim tbxPwdFld As MSHTML.HTMLInputElement
        Dim tbxUsrFld As MSHTML.HTMLInputElement
        Dim btnSubmit As MSHTML.HTMLInputElement
        On Error GoTo Err_Hnd
        'Create Internet Explorer Object
        Set objIE = New SHDocVw.InternetExplorer
        'Navigate the URL
        objIE.Navigate strURL_c
        'Wait for page to load
        Do Until objIE.ReadyState = READYSTATE_COMPLETE: Loop
        'Get document object
        Set ieDoc = objIE.Document
        'Get username/password fields and submit button.
        Set tbxPwdFld = ieDoc.all.Item("Passwd")
        Set tbxUsrFld = ieDoc.all.Item("Email")
        Set btnSubmit = ieDoc.all.Item("signIn")
        'Fill Fields
        tbxUsrFld.Value = username
        tbxPwdFld.Value = password
        'Click submit
        btnSubmit.Click
        'Wait for transistion page to load
        Do Until objIE.ReadyState = READYSTATE_COMPLETE: Loop
        'Wait for main page to load
        Do Until objIE.ReadyState = READYSTATE_COMPLETE: Loop
    Err_Hnd: '(Fail gracefully)
        objIE.Visible = True
    End Sub

  2. #2
    Registered User
    Join Date
    03-23-2011
    Location
    spain
    MS-Off Ver
    Excel 2003/2007
    Posts
    30

    Re: fields filling issue

    Is there any one who can tell me its solution?

  3. #3
    Registered User
    Join Date
    06-29-2011
    Location
    California
    MS-Off Ver
    Excel 2003/2007
    Posts
    58

    Re: fields filling issue

    I don't think there's a lot of support/knowledge for logging into non-microsoft systems and using scripts to execute this... =/ - Maybe one of the super MVPs might take a look at this.

  4. #4
    Registered User
    Join Date
    03-23-2011
    Location
    spain
    MS-Off Ver
    Excel 2003/2007
    Posts
    30

    Re: fields filling issue

    ya but i am looking for same since a week but o one wanna help me in this regard :-( i am fed up dude.

  5. #5
    Registered User
    Join Date
    06-29-2011
    Location
    California
    MS-Off Ver
    Excel 2003/2007
    Posts
    58

    Re: fields filling issue

    I'm very limited in using the objects commands of IE to execute what you want done - but the only thing I can think of is the fact that yahoo has a ton of buttons/ads and google, which is clean and easy, probably has simple names to reference the buttons you want executed =/. You might want to specifically look into a yahoo support website to make sure you're referencing (set = ) the correct buttons to be executed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0