Hi guys,
I got the script to extract data from email body to .txt file working . But there is email field in the body which contains email address and it's getting stored into .txt file in the format HYPERLINK "mailto:A11x@hotmail.co.uk"A11x@hotmail.co.uk
Is there any way I can change double quotes to '!!' sign so instead of above it should be showing as below in text file
HYPERLINK !!mailto:A11x@hotmail.co.uk!!A11x@hotmail.co.uk
Please see below the script:
I got the script to extract data from email body to .txt file working . But there is email field in the body which contains email address and it's getting stored into .txt file in the format HYPERLINK "mailto:A11x@hotmail.co.uk"A11x@hotmail.co.uk
Is there any way I can change double quotes to '!!' sign so instead of above it should be showing as below in text file
HYPERLINK !!mailto:A11x@hotmail.co.uk!!A11x@hotmail.co.uk
Please see below the script:
Code:
For I = 1 To SubFolder.Items.Count
messageArray = ""
strRowData = ""
Set myItem = SubFolder.Items(1)
msgtext = Trim(myItem.Body)
'search for specific text
delimtedMessage = Replace(Trim(msgtext), "Please confirm property location", "###")
delimtedMessage = Replace(Trim(delimtedMessage), "Are you currently on any plan?", "###")
delimtedMessage = Replace(Trim(delimtedMessage), "Have you received our letter about your options?", "###")
delimtedMessage = Replace(delimtedMessage, "Name of Borrower", "###")
delimtedMessage = Replace(delimtedMessage, "Account Number(s)", "###")
delimtedMessage = Replace(Trim(delimtedMessage), "Property Address", "###")
delimtedMessage = Replace(delimtedMessage, "Contact Telephone Number", "###")
delimtedMessage = Replace(delimtedMessage, "Email", "###")
messageArray = Split(delimtedMessage, "###")
For j = 1 To 8
strRowData = Replace(Replace(Replace(Trim(strRowData & Trim(messageArray(j)) & "|"), vbCr, ""), vbLf, " "), vbTab, "")
Next j
strRowData = Replace(strRowData, " " & vbCrLf, vbCrLf)
sFilePath = m & "Form" & I & "-" & Format(Now, "ddmmyyhhmmss") & ".txt"
Set objFile = objFS.CreateTextFile(sFilePath, False)
With objFile
.WriteLine strRowData
End With
myItem.Move myDestFolder
Next I