mercredi 4 janvier 2017

how to use vba select file from web

Sub test()
    'use ie open https://www.pinkoi.com/
    'Please use FB login then web
    Set IE = CreateObject("InternetExplorer.Application")
    IE.Visible = True
    IE.Navigate "http://ift.tt/2hROict"
    Do While IE.Busy Or IE.readyState <> 4: DoEvents: Loop
    With IE.Document
        i = 0: On Error Resume Next
        For Each E In .GetElementsByTagName("A")
            A = E.Text
            If CStr(A) = "傳送訊息" Then
                E.Click 'here can show then form,but i can put message and select file
            End If
        Next
    End With
End Sub

Aucun commentaire:

Enregistrer un commentaire