Hey
I've got emails in a desktop folder and I'm trying to list their file names in a worksheet. I've written the below code for that purpose but I'm facing a couple of problems:
1. The filenames are truncated: 20080607-MySpace pa#BFD0E4.html appears rather than 20080607-MySpace password request-36629. I understand this may have something to do with working on a mac, so I don't care so much about resolving this issue.
2. The listing stops part-way through so that i'm only getting about 33,000 instead of 38,000 emails listed. This is a problem.
Any help with the above would be greatly appreciated. Again, I note I'm using a mac.
i_excel
I've got emails in a desktop folder and I'm trying to list their file names in a worksheet. I've written the below code for that purpose but I'm facing a couple of problems:
1. The filenames are truncated: 20080607-MySpace pa#BFD0E4.html appears rather than 20080607-MySpace password request-36629. I understand this may have something to do with working on a mac, so I don't care so much about resolving this issue.
2. The listing stops part-way through so that i'm only getting about 33,000 instead of 38,000 emails listed. This is a problem.
Any help with the above would be greatly appreciated. Again, I note I'm using a mac.
i_excel
Code:
Sub ListEmails()
Dim i As Integer: i = 1
Dim StrFile As String
StrFile = Dir("Macintosh HD:Users:Name:Desktop:Gmail Data:test:messages:") '& filenameCriteria)
StrFile = Dir()
Do While StrFile <> ""
Cells(i + 1, 1) = i
Cells(i + 1, 2).Value = StrFile
StrFile = Dir()
i = i + 1
Loop
End Sub