Save reports sent out

cktcPeterson

Member
Local time
Today, 12:14
Joined
Mar 23, 2022
Messages
74
I have students who have applied for scholarships. When we send an approval letter, is there a way save it under their profile? Maybe a macro that uploads it as an attachment? Or any other ideas?
 
You would be best generating a disk file, pdf, and storing a link to that file.
 
In order to answer that question, we need to know your environment.

For example, IF you were talking about Office and the Outlook environment, then each user has a profile file that retains sent messages (at least for a while). You can move a message from SENT to a private profile folder that Outlook wouldn't touch.

If Outlook isn't in the picture then some other assumptions are involved. Which is why we need to know your environment.
 
Maybe a macro that uploads it as an attachment?
Code:
'Saving a report to PDF
Dim sPath$
    sPath = "D:\temp\Report_01.pdf"
    DoCmd.OpenReport "DataTest", acViewPreview, , "RecIDAuto=1", acHidden
    DoCmd.OutputTo acOutputReport, "DataTest", acFormatPDF, sPath, False
    DoCmd.Close acReport, "DataTest"

Or this way:
Code:
Dim sReportName$, sFilePath$
'Saving a report to PDF..
    sReportName = "Report Name"
    sFilePath = "D:\temp\ppt0000456.pdf"   
    DoCmd.OutputTo acOutputReport, sReportName, acFormatPDF, sFilePath, False
    MsgBox "File saved as: " & vbNewLine & sFilePath, vbInformation, "Report Exported as PDF"
 

Users who are viewing this thread

Back
Top Bottom