How does this look?
Option Compare Database
Option Explicit
Sub SendMessages(Optional AttachmentPath)
Dim MyDB As Database
Dim MyRS As Recordset
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach...
Ok, back the truck up for a second. That went over my head a little bit, LOL!
How do I structure the open report event?
I understand I need to change the names of things, I just post the code in generals for security reasons.
I was thinking of using a form to control the filter on the...
Ok, this is what I have so far. I'm a little unclear on how to implement the filter on the report. I just copied and pasted the code from the site you referenced into the script below.
Option Compare Database
Option Explicit
Sub SendMessages(Optional AttachmentPath)
Dim MyDB As Database...
Okay, I'm working on putting this in the script to output the file. I chose to use the DoCmd.OutputTo method. How do I put a custom name on the output file? I've tried doing this in the past, but haven't been able to succesfully implement it. I'd like to insert the current date and a field from...
I really want to post the code so you can show me where to insert those commands. The forum keeps telling me that I can't post email addresses, but my code doesn't contain any emails, I've removed all personal information.
3 more to go!
Would I be able to use a filter on the report (see below) when using the SendObject command?
Me.Filter = "ShipmentsID=" & Forms![Select Load List]![LoadID]
Me.FilterOn = True
I'll post the code I've put together already, as soon as the forum allows me...I have to reach 10 posts before I can.
Thanks for the reply. I was able to get the email to work, but how do I incorporate the creation of the customized report as the attachment?
I'm trying to post the code I've put together so far, but for some reason the forum won't let me do it because it says it contains email...