The following is a script I have written to text message me a text files contents. My problem is that my phone doesn't recognize the vbcrlf. Can anyone pleas help.
Dim Filename
Dim FSO
Dim TextStream
Dim file
dim SafeItem, oItem
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Filename = "c:\outlook.txt"
set FSO = createObject("Scripting.FileSystemObject")
set file = FSO.GetFile(Filename)
' Open the file
Set TextStream = file.OpenAsTextStream(ForReading, TristateUseDefault)
' Read the file line by line
Do While Not TextStream.AtEndOfStream
Dim StrLine
StrLine = TextStream.readline
' Do something with "Line"
StrLine = StrLine & vbCRLF
Loop
Set TextStream = nothing
Set FSO = nothing
Set objOutlk = createobject("Outlook.Application")
Set objMail = objOutlk.createitem(olMailItem)
set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem
SafeItem.Item = objMail 'set Item property
SafeItem.Recipients.Add "##########@mobile.mycingular.com"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = StrLine
SafeItem.Send
Set Btn = objOutlk.ActiveExplorer.CommandBars.FindControl(1, 7095)
Btn.Execute
set objMail = nothing
set objOutlk = nothing
Dim Filename
Dim FSO
Dim TextStream
Dim file
dim SafeItem, oItem
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Filename = "c:\outlook.txt"
set FSO = createObject("Scripting.FileSystemObject")
set file = FSO.GetFile(Filename)
' Open the file
Set TextStream = file.OpenAsTextStream(ForReading, TristateUseDefault)
' Read the file line by line
Do While Not TextStream.AtEndOfStream
Dim StrLine
StrLine = TextStream.readline
' Do something with "Line"
StrLine = StrLine & vbCRLF
Loop
Set TextStream = nothing
Set FSO = nothing
Set objOutlk = createobject("Outlook.Application")
Set objMail = objOutlk.createitem(olMailItem)
set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem
SafeItem.Item = objMail 'set Item property
SafeItem.Recipients.Add "##########@mobile.mycingular.com"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = StrLine
SafeItem.Send
Set Btn = objOutlk.ActiveExplorer.CommandBars.FindControl(1, 7095)
Btn.Execute
set objMail = nothing
set objOutlk = nothing