funkytunaa
Technical User
I have an outlook script that runs through a rule, the script uses "SendKeys" to send data to a terminal program.
My problem is that the script times out a various intervals when sending the information. Sometimes all the information will send and sometimes only about half. No error messages comes up or anything, just stops sending keys strokes.
I think a pause after each sendkeys statement may help but I can't figure out how. Below is the script I am using.
Sub CustomMailMessageRule(Item As Outlook.MailItem)
mobnum = Item.Subject
strBody = GetMessageBody
'DoCmd.SetWarnings False
Dim mobs As String
'mobs = Shell("c:\Program Files\Windows NT\hypertrm.exe", 1)
'AppActivate mobs
'openfile "c:\MobileSend.ht" '"c:\Program Files\Windows NT\hypertrm.exe"
Dim RetVal
RetVal = Shell("C:\Program Files\Windows NT\HYPERTRM.EXE /d _ \\..\..\..\..\..\..\MobileSend.ht", 1)
SendKeys "AT{ENTER}", True
Wait = 5
SendKeys "AT{+}CSCA=+'{+}61411990001+'{ENTER}", True
SendKeys "AT{+}CMGF = 1{ENTER}", True
SendKeys "AT{+}CMGS = +'"
SendKeys mobnum, True
SendKeys "+'{ENTER}", True
SendKeys strBody, True
SendKeys "{ENTER}", True
End Sub
Any Ideas would be appreciated.
Cheers!!!!!
Chris
My problem is that the script times out a various intervals when sending the information. Sometimes all the information will send and sometimes only about half. No error messages comes up or anything, just stops sending keys strokes.
I think a pause after each sendkeys statement may help but I can't figure out how. Below is the script I am using.
Sub CustomMailMessageRule(Item As Outlook.MailItem)
mobnum = Item.Subject
strBody = GetMessageBody
'DoCmd.SetWarnings False
Dim mobs As String
'mobs = Shell("c:\Program Files\Windows NT\hypertrm.exe", 1)
'AppActivate mobs
'openfile "c:\MobileSend.ht" '"c:\Program Files\Windows NT\hypertrm.exe"
Dim RetVal
RetVal = Shell("C:\Program Files\Windows NT\HYPERTRM.EXE /d _ \\..\..\..\..\..\..\MobileSend.ht", 1)
SendKeys "AT{ENTER}", True
Wait = 5
SendKeys "AT{+}CSCA=+'{+}61411990001+'{ENTER}", True
SendKeys "AT{+}CMGF = 1{ENTER}", True
SendKeys "AT{+}CMGS = +'"
SendKeys mobnum, True
SendKeys "+'{ENTER}", True
SendKeys strBody, True
SendKeys "{ENTER}", True
End Sub
Any Ideas would be appreciated.
Cheers!!!!!
Chris