RE: Hyperlink for email
- From: Access101 <Access101@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 24 Aug 2006 12:05:02 -0700
I may not have read your question correctly either ... easy to do when I'm in
a rush.
I'm now thinking you have something like this:
C:\AcRptSavedbyCute Pdf_1.pdf
C:\AcRptSavedbyCute Pdf_2.pdf
C:\AcRptSavedOutSideAccess_1.pdf
strFile(0) = "C:\AcRptSavedbyCute Pdf_1.pdf"
strFile(1) ="C:\AcRptSavedbyCute Pdf_2.pdf"
strFile(2) = "C:\AcRptSavedOutSideAccess_1.pdf"
If this is the case, you could just repeat the "Attachment" line of code
For i = 1 to CountFilesInMyHoldingTankTmpDir
.Attachments.Add strFile(i)
next i
Let me know if this helps.
"PHisaw" wrote:
Thank you for the reply. I don't think my first message may have been clear..
The code I use takes the reports I have in Access and uses the Cute Pdf
Writer to convert them from snapshot to pdf's and then I save them from
dialog box that pops up to a file that I use to store all documents in that I
want to email. I have a command button to click to take me to this file and
then select all and email.
I was hoping there would be some way to select this pdf file that is outside
the database and pull it into this temp file with the other Access reports
that are saved as pdf's. I may be asking for too much, but thought it worth
a try anyway.
If you have any other suggestions, I would appreciate hearing from you.
Thanks,
Pam
"Access101" wrote:
Let me know if this helps
Sub EmailPDF()
Dim outApp As Outlook.Application, outMsg As MailItem
Set outApp = CreateObject("Outlook.Application")
Set outMsg = outApp.CreateItem(olMailItem)
strEmail = "myemail@xxxxxxxxxxxxx"
strCC = "myemail@xxxxxxxxxxxxx"
strBCC = "myemail@xxxxxxxxxxxxx"
strSubject = "My PDF"
strPhoto = strMyPath & strMyPDF
strMsg = "Here's your PDF"
With outMsg
.Importance = olImportanceHigh
.To = strEmail
.CC = strCC
.BCC = strBCC
.Subject = strSubject
.Body = strMsg
If IsNull(Me.PhotoFileName) Then
Else
.Attachments.Add strPhoto
End If
.Display
.Send
End With
Set outApp = Nothing
Set outMsg = Nothing
End Sub
"PHisaw" wrote:
Hi Again,
I use the code below to email reports. I have the report Decontamination
Guidelines set up in Access. I needed something other than Snapshot reports,
as not everyone had or was willing to use Snapshot viewer. Did some research
and found valuable help at this site on the Cute PDF writer and setting
application printers. Worked great until boss wanted something different.
Decided we needed something more illiustrated. Set up Powerpoint
presentation and saved as a pdf file.
Now the problem I have (and I so hope someone will have an idea to make it
work) is that the pdf file is outside my database and I would very much like
to still click my command button and have all reports, including the pdf file
outside the db, show up on the email message as attachments automatically.
If someone has a solution, I would very much appreciate it.
Thanks in advance,
Pam
Private Sub CommandEmailRMA_Click()
On Error GoTo Err_CommandEmailRMA_Click
Me.Refresh
If Me.PumpType = "SCMP" Then
Set Application.Printer = Application.Printers("CutePDF Writer")
DoCmd.OpenReport "rRMAPage1", , , "JobNumber=" &
[Forms]![f*GeneralInformationWITHQUOTE]![JobNumber]
DoCmd.OpenReport "rScmpDecontaminationGuidelines"
Set Application.Printer = Nothing
Else
Set Application.Printer = Application.Printers("CutePDF Writer")
DoCmd.OpenReport "rRMAPage1", , , "JobNumber=" &
[Forms]![f*GeneralInformationWITHQUOTE]![JobNumber]
Set Application.Printer = Nothing
End If
Exit_CommandEmailRMA_Click:
Exit Sub
Err_CommandEmailRMA_Click:
MsgBox Err.Description
Resume Exit_CommandEmailRMA_Click
End Sub
- Follow-Ups:
- RE: Hyperlink for email
- From: PHisaw
- RE: Hyperlink for email
- References:
- RE: Hyperlink for email
- From: Access101
- RE: Hyperlink for email
- From: PHisaw
- RE: Hyperlink for email
- Prev by Date: Re: I'd like my delete warning back. I don't know where it went.
- Next by Date: Re: Setting MultiSelect Properties to a ListBox at Runtime
- Previous by thread: RE: Hyperlink for email
- Next by thread: RE: Hyperlink for email
- Index(es):
Loading