C
ChrisCharles
Hi there, I have an email sent to me when a file has finished backing up on
my server. It is sent with the Subject of the email as follows:
Status change for *file.xyz*
I am trying to create a script that processes this Subject line and then
launches an FTP client with the right parameters in order to download the
backup file. Currently I am not passing the parameters as I cannot get it to
work yet. I have a fair bit of experience with C/C++ but am a total beginner
to VBA, I was wondering if somebody could help me as to why this script isnt
working.
Sub StartFTPTransfer(TheEMail As Outlook.MailItem)
Dim Subject As String
Subject = TheEMail.Subject
Dim SubjectArray() As String
For Arrayify = 1 To Len(Subject)
SubjectArray = Mid(Subject, Arrayify, 1)
Next Arrayify
Dim i As Integer
i = 0
Do Until SubjectArray(i) = "*"
i = i + 1
Loop
Dim FileName As String
Do Until SubjectArray(i) = "*"
FileName = FileName & SubjectArray(i)
i = i + 1
Loop
Dim stAppName As String
stAppName = "D:\Program Files\FlashFXP\FlashFXP.exe"
Call Shell(stAppName, vbMaximizedFocus)
End Sub
my server. It is sent with the Subject of the email as follows:
Status change for *file.xyz*
I am trying to create a script that processes this Subject line and then
launches an FTP client with the right parameters in order to download the
backup file. Currently I am not passing the parameters as I cannot get it to
work yet. I have a fair bit of experience with C/C++ but am a total beginner
to VBA, I was wondering if somebody could help me as to why this script isnt
working.
Sub StartFTPTransfer(TheEMail As Outlook.MailItem)
Dim Subject As String
Subject = TheEMail.Subject
Dim SubjectArray() As String
For Arrayify = 1 To Len(Subject)
SubjectArray = Mid(Subject, Arrayify, 1)
Next Arrayify
Dim i As Integer
i = 0
Do Until SubjectArray(i) = "*"
i = i + 1
Loop
Dim FileName As String
Do Until SubjectArray(i) = "*"
FileName = FileName & SubjectArray(i)
i = i + 1
Loop
Dim stAppName As String
stAppName = "D:\Program Files\FlashFXP\FlashFXP.exe"
Call Shell(stAppName, vbMaximizedFocus)
End Sub