Public Sub Command78_Click() DoCmd.SetWarnings False Dim strErrMsg As String 'For Error Handling Dim olApp As New Outlook.Application Dim olNameSpace As Outlook.NameSpace Dim olMail As Outlook.MailItem Dim oleGrf As Object Dim strFileName As String Set olNameSpace = olApp.GetNamespace("MAPI") Set olMail = olApp.CreateItem(olMailItem) grantee = DLookup("[grantee]", "grantinfotable") sandf = "c:\" & grantee & "_sandf.txt" commev = "c:\" & grantee & "_commev.txt" parev = "c:\" & grantee & "_parev.txt" schev = "c:\" & grantee & "_schev.txt" Play = "c:\" & grantee & "_play.txt" Sites = "c:\" & grantee & "_sites.txt" DoCmd.TransferText acExportDelim, , "Scope and Fidelity", sandf, True <- ERRORS ON THIS LINE DoCmd.TransferText acExportDelim, , "Community Events", commev, True DoCmd.TransferText acExportDelim, , "Parent Events", parev, True DoCmd.TransferText acExportDelim, , "School Events", schev, True DoCmd.TransferText acExportDelim, , "Sites", Sites, True DoCmd.TransferText acExportDelim, , "play", Play, True With olMail .To = "DHagerman@NJHI.org" .Subject = grantee & " - Scope and Fidelity Data on " & DATE .Body = "Data is attached. Save data on drive, then import to program." .Attachments.Add sandf .Attachments.Add commev .Attachments.Add parev .Attachments.Add schev .Attachments.Add Sites .ReadReceiptRequested = False .Send End With MsgBox vbCrLf & "Data has been emailed! If asked be sure to answer YES to the Outlook prompt.", vbOKOnly command78_Click_Exit: Set olApp = Nothing Set olMail = Nothing Exit Sub End Sub
|MS Access Memo (Long Text) Field Not Exporting Correctly From a Query||13||41|
|How to make query not show results in table form go straight to report||4||21|
|I need to be able to get MAX(date)-1 from table.||4||26|
|Match characters in text string and then parse text string in Access Query||10||22|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
19 Experts available now in Live!