Well, it´s not perfect but it works for me:
i do call to progress which is just a status bar, and obviously you´ll have
to make it work to read the links in the columns where you have it.
That´s the main module, but I use much more but I am not allowed to share
them all, if you know what you are doing then you are already close enough.
Sub DownloadPics2()
Application.ScreenUpdating = True
Dim ws As Worksheet
Dim Lastrow As Long, i As Long, j, k As Long
Dim strPath As String
Dim porcentaje As Single
Dim respuesta, respuesta2 As Integer
Dim basura As String
ActiveSheet.Name = "Export"
Set ws = Sheets("Export")
'~~> Name of the sheet which has the list
'Miro cuantas lineas hay y las compruebo todas
respuesta = MsgBox("¿do you wanna download the pictures? It can take
some time", vbYesNo + vbQuestion, "report")
If respuesta = vbYes Then
respuesta2 = MsgBox("¿do you wanna add already existing pictures (so it
does not download themn again)? if you do then drop then in the next window
" & CARPETA, vbYesNo + vbQuestion, "Reporte campaña")
If respuesta2 = vbYes Then
basura = FilePath2
End If
Lastrow = ws.Range("B" & Rows.count).End(xlUp).Row
For i = 2 To Lastrow '<~~ 2 because row 1 has headers
For j = 8 To 18
If ws.Cells(i, j).Value <> "" Then
If j >= 8 Then
'MsgBox "es la primera"
strPath = ws.Range("d" & i).Value & "_" & (j - 7) & ".jpg"
If Dir(CARPETA & "\" & strPath) <> "" Then
'MsgBox "existe el primero"
For k = 8 To 18
If ws.Cells(i, k).Value <> "" Then
'MsgBox "escribo link existente"
strPath = ws.Range("d" & i).Value & "_" & (k -
-
& ".jpg"
ws.Hyperlinks.Add Anchor:=ws.Cells(i, k),
Address:=CARPETA & "" & strPath, TextToDisplay:=strPath
End If
Next k
j = 19
End If
End If
If j <> 19 Then
strPath = ws.Range("d" & i).Value & "_" & (j - 7) & ".jpg"
Ret = URLDownloadToFile(0, ws.Cells(i, j).Value, CARPETA &
"" & strPath, 0, 0)
If Ret = 0 Then
ws.Hyperlinks.Add Anchor:=ws.Cells(i, j),
Address:=CARPETA & "" & strPath, TextToDisplay:=strPath
Else
ws.Cells(i, j).Value = "ERROR DE DESCARGA"
ws.Cells(i, j).Interior.Color = 250
End If
End If
End If
porcentaje = Format(((11 * (i - 2) + (j - 8)) / ((Lastrow - 1) *
11)) * 100, "standard") 'Format(i / (LastRow + 1) * 100, "standard")
Progress porcentaje
Next j
Next i
Else
'do nothing
End If
End Sub
···
On Fri, Feb 5, 2016 at 6:27 AM, Ayoub Kakande wrote:
Pablo hi,
Would like to know more about those macros of yours, more especially do
they link images to excel
On 4 February 2016 at 18:01, Pablo Rodríguez < nuncaestardesillegaspronto@gmail.com> wrote:
Hi guys, I´m having another issue, (that I solve in another way). I
export the database in a CSV and then download the images and everything
with excel macros, but, now the exports are without extension with the name
"binaryData". Inside it is basically a CSV, so it is not a serious problem
with the program I wrote, now i just programed it so it basically starts by
adding the csv extension, but just saying about this other issue.
Regards,
Pablo
On Thu, Feb 4, 2016 at 1:28 PM, rivera.raffy@gmail.com wrote:
Hi guys,
just want to ask when will the new version (that solves filtering
issues) be available?
Thanks.
Raffy
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/CtQqeSVlNq8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
**In sun set years education is not associated with standard of living and
medical care access; it is the the financial myosin and actin!!!
**** Don't give me fish, teach me how to fish
Kayoub K
0772656158 / 0703516660
Data Manager
Mujhu Research Collaboration
Mulago Hosp
Msc Enterprise Architecture
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/CtQqeSVlNq8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.