The code below works fine when run from the mdb, but nothing happens when I run the mde, which is produced from the mdb. I have checked with msgbox commands and all commands get executed. Do you have any ideas?
stDocName = "VD-" & CStr(Format(Now, "yymmdd")) & "-" & Forms!frmDentalInfo!lngCustomerID & "-" & Forms!frmRootCanalTreatmentTemp!lngTooth
DoCmd.CopyObject , stDocName, acReport, "rptRootCanalTreatmentTemp"
DoCmd.SendObject _
acSendReport, _
stDocName, _
acFormatSNP, , , , , "*** If you cannot view the .snp attachment download Snapshot viewer from Microsoft.com ***"
DoCmd.DeleteObject acReport, stDocName
The mdb opens outlook and attaches the report as file VD-date-Customer-tooth.snp. BTW this is a dental software package (
www.VisualDentist.com)