Hi everyone,
This is a small part of a bigger problem, but it's one step at a time so here goes:
How does this fit into the syntax:
When, as far as I know, a normal SendObject procedure looks like this:
The reason I ask is because I want to take some of the elements from the second procedure, namely attaching a report snapshot, to the first one, which forms a small part of some code in my database.
I realise it is due to the fact that several of the field names are defined at the beginning of the code, but I'm not sure how to adapt it.
Thanks in advance!
This is a small part of a bigger problem, but it's one step at a time so here goes:
Code:
DoCmd.SendObject outputformat:=acFormatTXT, _
To:=rst(EmailAddressField), _
subject:=Me.Controls(MsgSubjectField), _
MessageText:=strMsgToSend, _
EditMessage:=False
If Err.Number <> 0 Then ' SendObject raised an error
bSendError = True
Err.Clear
End If
How does this fit into the syntax:
Code:
SendObject (Object Type,Object Name,Output Format,To,Cc,Bcc,Subject,Message Text,Edit Message,Template File)
When, as far as I know, a normal SendObject procedure looks like this:
Code:
On Error GoTo DistributorsSummary_Err
DoCmd.SendObject acReport, "Distributors Summary", "SnapshotFormat(*.snp)", "example@domain.com", "", "", "Example Email", "Dear such and such please find attached etc.", False, ""
DistributorsSummary_Exit:
Exit Function
DistributorsSummary_Err:
MsgBox Error$
Resume DistributorsSummary_Exit
End Function
The reason I ask is because I want to take some of the elements from the second procedure, namely attaching a report snapshot, to the first one, which forms a small part of some code in my database.
I realise it is due to the fact that several of the field names are defined at the beginning of the code, but I'm not sure how to adapt it.
Thanks in advance!