Question : Message size limited using SendObject?

I've been using a routine for years that emails return authorizations from an Access database. We recently added some more wording and it increases the body size of some messages to over 1,200 characters. It seems that this is some sort of limit in the SendObject function perhaps?
Is there a way around it, really don't want to break the message into 2 emails.
The meat of it is
Dim MessageBody as String
CustEmail="[email protected]"
ouremail="[email protected]"
MessageSubject="MessageSubject"
MessageBody=1200+ characters
DoCmd.SendObject acSendNoObject, , , CustEmail, Ouremail, , MessageSubject, MessageBody, True

Answer : Message size limited using SendObject?

Don't use SendObject, try this instead:

Call SendMsg(MessageSubject, MessageBody, CustEmail)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
Function SendMsg(strSubject As String, _
                   strBody As String, _
                   strTO As String, _
                   Optional strDoc As String, _
                   Optional strCC As String, _
                   Optional strBCC As String)
       
    Dim oLapp As Outlook.Application
    Dim oItem As Outlook.MailItem

    Set oLapp = CreateObject("Outlook.Application")
    Set oItem = oLapp.CreateItem(olMailItem)

    oItem.Subject = strSubject
    oItem.To = strTO
    oItem.CC = strCC
    oItem.BCC = strBCC
    oItem.BodyFormat = olFormatHTML
    oItem.HTMLBody = strBody
    oItem.Importance = olImportanceHigh
    
    'oItem.Display - Displays the email but doesn't send so you can see what it looks like
    oItem.send
    
    Set oLapp = Nothing
    Set oItem = Nothing
        
End Function
Random Solutions  
 
programming4us programming4us