Visual Basic para Aplicaciones - cargar archivo en pagina web

Life is soft - evento anual de software empresarial
 
Vista:
sin imagen de perfil

cargar archivo en pagina web

Publicado por marc (1 intervención) el 05/02/2017 12:32:24
Buenos dias,

He generado un programa que me inserta datos en una pagina web y tiene que cargar un archivo pero al hacer click donde debo incorporar el archivo se abre un browser de windows y no se como buscarlo y cargarlo.

muchas gracias por vuestra ayuda !!

codigo;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Sub Rellenareco()
 
Dim IE As Object, alquiler As Variant, habit As Variant, albas As Variant, fecha As String
 
alquiler = InputBox("coste alquiler", , , 1000, 1000)
habit = InputBox("coste habitabilidad", , , 1000, 1000)
albas = InputBox("coste alquiler basico", , , 1000, 1000)
fecha = fecha = Year(Now) & Month(Now) & Day(Now)
 
 
Hoja4.Range("L11") = alquiler
Hoja4.Range("L12") = habit
Hoja4.Range("L13") = albas
 
Set IE = CreateObject("InternetExplorer.application")
IE.Navigate "https://.net/eco/app/login"
 
Do
    DoEvents
Loop Until IE.readystate = 4
IE.Document.All("j_username").Value = ""
IE.Document.All("j_password").Value = ""
IE.Document.All("submit").Click
 
Application.Wait Now + TimeValue("00:00:03")
IE.Document.All("menuForm:inmuebles").Click
Application.Wait Now + TimeValue("00:00:03")
IE.Document.All("form_search_inmuebles:idURSearhTextArea1").Value = Hoja1.Range("C3")
IE.Document.All("form_search_inmuebles:j_idt162").Click
Application.Wait Now + TimeValue("00:00:05")
IE.Visible = True
IE.Document.All("inmueblesResultsForm:resultadosInmuebles:0:j_idt168").Click
Application.Wait Now + TimeValue("00:00:04")
IE.Document.All("actuacionesForm:fachadaResultsTable:0:j_idt130").Click
Application.Wait Now + TimeValue("00:00:04")
IE.Document.All("form_consulta_datos_actuacion:fachadaAltaTextArea39").Value = Hoja4.Range("M11") + vbCr + Hoja4.Range("M12") + vbCr + Hoja4.Range("M13")
IE.Document.All("form_consulta_datos_actuacion:j_idt2097").Click 'guardar observaciones
Application.Wait Now + TimeValue("00:00:04")
IE.Document.All("form_consulta_datos_actuacion:costeAdecuacionText").Value = Hoja4.Range("L11")
IE.Document.All("form_consulta_datos_actuacion:costeActaText").Value = Hoja4.Range("L10")
IE.Document.All("form_consulta_datos_actuacion:honoSST").Value = Hoja4.Range("L8")
IE.Document.All("form_consulta_datos_actuacion:costeCertEnergText").Value = Hoja4.Range("L9")
IE.Document.All("form_consulta_datos_actuacion:estadoAdecSelect").Value = Hoja4.Range("L14")
IE.Document.All("fachadaDocumentsForm:j_idt1786").Click 'guardar datos
Application.Wait Now + TimeValue("00:00:02")
IE.Document.All("form_input_document:fachadaConsultaText41").Value = Hoja4.Range("U6") & fecha
IE.Document.All("form_input_document:j_idt1793").Click
Application.Wait Now + TimeValue("00:00:02")
IE.Visible = True
IE.Document.All("form_input_document:j_idt284").Click
 
 
End Sub

Capture
Capture1
Capture2
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder