bryVA
06-29-2009, 11:03 AM
Hello,
I have the following code that will take a large amount of data in a textbox and place it in a database. The issue is that if I place any parentheses in the textbox when it loops through the array it takes the parentheses out. Any idea why?
MAPDocuments = "Received a request from " & TextBox9.Value & " " & TextBox10.Value & " " & TextBox11.Value & "to Send a " & GetRegData("FormType") & " to " & sentletto & ". Sending letter." & vbCrLf
Const StrLen = 127
Dim NumElems As Integer
Dim Temp() As String
NumElems = (Len(MAPDocuments) / StrLen) + 1
ReDim Temp(1 To NumElems) As String
' Build the Temp array
For i = 1 To NumElems
Temp(i) = Mid(MAPDocuments, ((i - 1) * StrLen) + 1, StrLen)
Next i
On Error Resume Next
AppActivate "MAPD", True
Application.SendKeys Temp, True
Else
End If
The reason why I go through the array is when I try to send more than 250 charecters in a variable it doesn't pull all the data over into the database.
I have the following code that will take a large amount of data in a textbox and place it in a database. The issue is that if I place any parentheses in the textbox when it loops through the array it takes the parentheses out. Any idea why?
MAPDocuments = "Received a request from " & TextBox9.Value & " " & TextBox10.Value & " " & TextBox11.Value & "to Send a " & GetRegData("FormType") & " to " & sentletto & ". Sending letter." & vbCrLf
Const StrLen = 127
Dim NumElems As Integer
Dim Temp() As String
NumElems = (Len(MAPDocuments) / StrLen) + 1
ReDim Temp(1 To NumElems) As String
' Build the Temp array
For i = 1 To NumElems
Temp(i) = Mid(MAPDocuments, ((i - 1) * StrLen) + 1, StrLen)
Next i
On Error Resume Next
AppActivate "MAPD", True
Application.SendKeys Temp, True
Else
End If
The reason why I go through the array is when I try to send more than 250 charecters in a variable it doesn't pull all the data over into the database.