RE: Sending email from access - Reference Stephen Lebans code
- From: Patricio <Patricio@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Aug 2008 10:17:01 -0700
Ups, sorry, having problems whit attachements, try this one
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set Attamm = myItem.attachments
myItem.to = "irshad2.gthe@xxxxxxxxxxxxx"
myItem.cc = "naaeems.gthe@xxxxxxxxxxxxx"
myItem.Subject = "Job-" & Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value
myItem.body = "Reference is made to subject claim, attached pls. find
the claim form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
setnewAttacment = Attamm.Add("C:\WsImpFiles\MyClaimedPDF\" & "Job-" &
Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value & ".PDF", olbyvalue)
myItem.Send
"Patricio" wrote:
Hope this help you.
Sub SendingMail()
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.to = "irshad2.gthe@xxxxxxxxxxxxx"
myItem.cc = "naaeems.gthe@xxxxxxxxxxxxx"
myItem.Subject = "Job-" & Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value
myItem.body = "Reference is made to subject claim, attached pls. find
the claim form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
myItem.Attach = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" & Me.JobNo &
"-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
myItem.Send
End Sub
Regards
"Irshad Alam" wrote:
I have used the code and dll files after downloading from Mr. Stephen Lebans
website for converting the report to pdf (which have also dynapdf.dll &
strstorage.dll) . The following code I used which worked perfectly :
Private Sub Label59_Click()
RepoToPdfWC
End Sub
Function RepoToPdfWC()
Dim blRet As Boolean
blRet = ConvertReportToPDF(Me.Text60, vbNullString,
"C:\WsImpFiles\MyClaimedPDF\" & "Job-" & Me.JobNo & "-ClaimRef." &
Me.ClaimRefNo.Value & ".PDF", False)
End Function
Note : Me.Text60 contains the report name
The above sucessfully converts to pdf and open the pdf into acrobat 5
I want to add more codes and edit on above to get my below requirement
1 It should not open the acrobat for preview
2. it should open outlook express 6 - new email message and attach the above
created pdf and according to below BUT should not send, so that I can have a
final view before sending :
Email as below :
From: = mirshadalam@xxxxxxxxxxx
To: = irshad2.gthe@xxxxxxxxxxxxx
CC: = naaeems.gthe@xxxxxxxxxxxxx
Subject: = "Job-" & Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value
Body = "Reference is made to subject claim, attached pls. find the claim
form as pdf"
Bodysecondline="Thanks"
Bodythirdline="Irshad"
AttachmentFile="C:\WsImpFiles\MyClaimedPDF\" & "Job-" & Me.JobNo &
"-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
Note2 : I am using Windows XP svcpack2 and outlook express 6 , ms office 2000
Please advice, it will help me to reduce job time of hours.
Regards
Irshad
- Follow-Ups:
- RE: Sending email from access - Reference Stephen Lebans code
- From: Irshad Alam
- RE: Sending email from access - Reference Stephen Lebans code
- References:
- Sending email from access - Reference Stephen Lebans code
- From: Irshad Alam
- Sending email from access - Reference Stephen Lebans code
- Prev by Date: Re: VBA for Path of Current MDB
- Next by Date: Re: VBA Problem on Treeview
- Previous by thread: Sending email from access - Reference Stephen Lebans code
- Next by thread: RE: Sending email from access - Reference Stephen Lebans code
- Index(es):
Relevant Pages
|