I have the following VBA and it is stopping once it has time the Description Field in the email. I have researched and there seems to be a 255 character limit. How do I work around that get an infinite number of characters depending on variable inputs.
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Sub GenerateVolumeQuoteEMail()
Dim Email As String, Subj As String
Dim Msg As String, URL As String
Dim r As Integer, x As Double
For r = 4 To 4 'data in rows 2-4
' Get the email address
' Email = Cells(r, 6)
' Message subject
Subj = "Volume Rate Request"
' Compose the message
Msg = ""
Msg = Msg & "UTS Order ID: " & Cells(r, 12) & vbCrLf & vbCrLf
Msg = Msg & "Shipping Adress: " & Cells(r + 1, 12) & vbCrLf & vbCrLf
Msg = Msg & "Consignee Adress: " & Cells(r + 2, 12) & vbCrLf & vbCrLf
Msg = Msg & "Description: " & Cells(r + 3, 12) & vbCrLf & vbCrLf
Msg = Msg & "Hazmat (Yes or No): " & Cells(r + 4, 12) & vbCrLf & vbCrLf
Msg = Msg & "Skid Count: " & Cells(r + 4, 12) & vbCrLf & vbCrLf
Msg = Msg & "Weight (in LBS): " & Cells(r + 6, 12) & vbCrLf & vbCrLf
Msg = Msg & "Class: " & Cells(r + 7, 12) & vbCrLf & vbCrLf
Msg = Msg & "Dimensions: " & Cells(r + 8, 12) & vbCrLf & vbCrLf
Msg = Msg & "Stackable: " & Cells(r + 9, 12) & vbCrLf & vbCrLf
Msg = Msg & "Special Requirements: " & Cells(r + 10, 12) & vbCrLf & vbCrLf
' Replace spaces with %20 (hex)
Subj = Application.WorksheetFunction.Substitute(Subj, " ", "%20")
Msg = Application.WorksheetFunction.Substitute(Msg, " ", "%20")
' Replace carriage returns with %0D%0A (hex)
Msg = Application.WorksheetFunction.Substitute(Msg, vbCrLf, "%0D%0A")
' Create the URL
URL = "mailto:" & Email & "?subject=" & Subj & "&body=" & Msg
' Execute the URL (start the email client)
ShellExecute 0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus
' Wait two seconds before sending keystrokes
' Application.Wait (Now + TimeValue("0:00:02"))
' Application.SendKeys "%s"
Next r
End Sub
Please help as I am still learning.