I am trying to write a script triggered from an Outlook email to parse the email (as a text file) and then update an excel spreadsheet with specific data extracted from the email. The email is a form email delineated by a "/" for field breaks and "//" for end of line. However, when I create a text stream to read in the data, the returned string does not include these delineations. Here is a copy of the code I am currently using to open and read the file. I don't want to open the entire email as a new workbook, so I can't use the workbook function.
Set fs = CreateObject("Scripting.FileSystemObject")
Set ts = fs.OpenTextFile("file.txt", ForReading, TristateTrue)
check = True
Do
s = ts.Readline
endlinepos = InStr(s, "//")
Do While endlinepos = 0
tempstr = ts.Readline
s = s + tempstr
endlinepos = InStr(s, "//")
Loop
tempstr = Mid$(s, 1, endlinepos - 1)
s = Mid$(s, endlinepos + 2, Len(s) - endlinepos - 2)
ActiveCell.FormulaR1C1 = tempstr
ActiveCell.Offset(1, 0).Activate
When I debug this, I notice all instances of "/" have been removed from the string. I know this is normally the signaler for a special char, but how can I make sure the text stream sees this
Also if anyone has any suggestions for how to pass an argument in a script call FROM OUTLOOK RULES, I would appreciate it.
Thanks for the help.

File Stream issues
carrielm
The VB within Outlook is Visual Basic for Application. VBA is a very different product from VB.NET and there are some other locations where youy will probably get a quicker and better response to your VBA questions.
You may find more assistance in following which specifically deals with VBA development.
http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=74&SiteID=1
Office Automation: office.developer.automation newsgroup
http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.automation&lang=en&cr=US
Or the Office Newgroups
http://www.microsoft.com/office/community/en-us/default.mspx d=1
Hope that helps
Shafa
CodyPasspied
Sorry, but these forums are for VB.Net development. For VBA, please go to the Office Developer site.
http://msdn.microsoft.com/office/community/default.aspx