add more people to cc and dont send report

steve111

Registered User.
Local time
Today, 20:34
Joined
Jan 30, 2014
Messages
429
hi

I would like to put 3 more people on as a CC
but don't send the report
could you help me to do this from the code below

thanks
steve

Code:
 Dim strTo As String
    Dim strSubject As String
    Dim strMessageText As String
    
    Me.Dirty = False
    
    strTo = Me.E_Mail_address
    strSubject = " Please action NCR  " & Me.[loss order number]
    strMessageText = "NCR Number " & ":" & _
        vbNewLine & vbNewLine & _
        "Your latest Acknowledgement is attached."
         
      DoCmd.SendObject ObjectType:=acSendReport, _
        ObjectName:="order acknowledgement", _
        OutputFormat:=acFormatPDF, _
        TO:=strTo, _
        Subject:=strSubject, _
        MESSAGETEXT:=strMessageText, _
        EditMessage:=True
 
Last edited:
If the EditMessage property is set to True then the e-mail should not be sent?

And you can add recipients as CC's by adding them to the CC property?

Code:
DoCmd.SendObject ObjectType:=acSendReport, _
                 ObjectName:="order acknowledgement", _
                 OutputFormat:=acFormatPDF, _
                 To:=strTo, _
[COLOR=red]                 Cc:="[/COLOR][COLOR=red]recipient@domain.com"[/COLOR][COLOR=red],[/COLOR] _
                 Subject:=strSubject, _
                 MessageText:=strMessageText, _
[COLOR=red]                 EditMessage:=True[/COLOR]

See this link for MSDN's explanation of the .SendObject method
 
hi ,

the CC is now working but the report is still attached to the e-mail of which I don't want
I just want to send the e-mail

steve
 
You don't want to attach the report to the e-mail?

So why are you using this?

Code:
ObjectType:=[COLOR=red]acSendReport[/COLOR]

Did you look at that link I included?

Perhaps this is what you are trying to do?

Code:
ObjectType:=[COLOR=red]acSendNoObject[/COLOR]
 

Users who are viewing this thread

Back
Top Bottom