Hello there. Couple of years ago you guys helped me with some school project. I'm hoping you could help me now.
So i got this code (from last project)

Code:
Sub Project(objMail As MailItem)
    Dim objReply As MailItem
    Dim strFileName As String, strRecordData As String
    
    
Dim Array(1 To 213) As String, Transl() As String
    Dim intFileNum As Integer, intCount As Integer
        
  strFileName = "C:\Users\NANA\Desktop\test.txt"
    
    intFileNum = FreeFile
    intCount = 1
    
    Open strFileName For Input As #intFileNum
    
    Do Until EOF(intFileNum) Or intCount > 213
        Input #intFileNum, strRecordData
        Array(intCount) = strRecordData
        intCount = intCount + 1
    Loop
    
    Close #intFileNum
    
    On Error Resume Next
    Set objReply = objMail.Reply
    On Error GoTo 0
    
    For i = LBound(Array) To UBound(Array)
        Transl = Split(Array(i), " -> ")
        If objMail.Subject = Transl(0) Then
            objReply.Subject = "Word " + objMail.Subject + " translation is: " + Transl(1)
            Exit For
        End If
    Next i

    objReply.Save
    objReply.Send
    Set objReply = Nothing
End Sub
What this code does is when a new email comes to inbox it checks if the subject text is in test.txt file, if it is then it automaticly replies but changes the subject name to the name that is next in that txt file. For example, if message come with subject name HDD, it finds it in txt file and replies with Hard Disk Drive, because in text file it looks like HDD -> Hard Disk Drive.
Project has changed a bit, and i'm stuck. I don't know how to modify the code.
Idea will be the same that it replies with the word(s) after "->"
The original project was a small SMS Dictionary, i sent a SMS from phone to email with a specific word and it replied with translation. Idea stays the same, just little complitated.
I Have an app that automaticly forwards incoming SMS to my email account, the problem is, that when it's forwaring the sender shown as my e-mail adress but no phone number. The phone number is shown in subject.
I hope example helps:
I send a word "RAM" in a SMS (from number 1234567 to my phone, the app forwards it to my email and it looks like :
Sent from: myemail@email.com
To myemail@email.com
Subject: Message From /Conact Name/ (+12312345678)
Email text: RAM

So what i need to do is when email comes that it checks if subject contains "Message From" if it does then it replies word RAM translation (whitch will be in *.txt file after separretor ->) to the number that is in the braccts (), the number could be different every time and adds after +12312345678 something like @nana.dada.com


So incoming email is:
Sent from: myemail@email.com
To myemail@email.com
Subject: Message From /Conact Name/ (+12312345678)
Email text: RAM

Outgoing

To: +12312345678@nana.dada.com
Subj: Translation
Text: Random Access Memory (it will take it from *.txt file)

That's pretty much it. Sorry for the long post, probl could have explained it shorter.
I'm guessing it won't be AutoReply this time, maybe with code has to create new email, taking everything in brackets and putting it to Send to and adding @nana.dada.com at the send. creating subject name and putting it translated word in email text.
Any ideas?