Sending email from access - Reference Stephen Lebans code

This is a discussion on Sending email from access - Reference Stephen Lebans code within the ADO DAO RDO RDS forums in Framework and Interface Programming category; 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 ...

Go Back   Application Development Forum > Framework and Interface Programming > ADO DAO RDO RDS

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-28-2008, 04:58 AM
Irshad Alam
Guest
 
Default Sending email from access - Reference Stephen Lebans code

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@hotmail.com
To: = irshad2.gthe@ggcompany.com
CC: = naaeems.gthe@ggcompany.com
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







Reply With Quote
  #2  
Old 08-28-2008, 03:21 PM
dch3
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

I'm not familar with the code that you refer to, however if its using the
Outlook object model to create a MailItem, the .Send Property is the one that
actually sends the email. If its in the code, replace it with .Display.

See...
http://msdn.microsoft.com/en-us/libr...m.display.aspx

If you need code to actually create the MailItem see...
http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

To attach the file, see
http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

"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@hotmail.com
> To: = irshad2.gthe@ggcompany.com
> CC: = naaeems.gthe@ggcompany.com
> 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
>
>
>
>
>
>
>

Reply With Quote
  #3  
Old 08-29-2008, 01:05 PM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Hope this help you
Sub SendingMail()

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.to = "irshad2.gthe@ggcompany.com"
myItem.cc = "naaeems.gthe@ggcompany.com"
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@hotmail.com
> To: = irshad2.gthe@ggcompany.com
> CC: = naaeems.gthe@ggcompany.com
> 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
>
>
>
>
>
>
>

Reply With Quote
  #4  
Old 08-29-2008, 01:17 PM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

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@ggcompany.com"
myItem.cc = "naaeems.gthe@ggcompany.com"
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@ggcompany.com"
> myItem.cc = "naaeems.gthe@ggcompany.com"
> 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@hotmail.com
> > To: = irshad2.gthe@ggcompany.com
> > CC: = naaeems.gthe@ggcompany.com
> > 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
> >
> >
> >
> >
> >
> >
> >

Reply With Quote
  #5  
Old 08-30-2008, 03:24 AM
Irshad Alam
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Thank your for advise.

I copied this code and tried, but the following error occured

1. Its is opening/making the mail in Ms Outlook, While I need the same to
be done in Outlook express 6.

2. Above when I tested, found that it is getting shortcut attached of the
file, not the file is getting attached.

3. The body line code is not perfect, it producing error, I modified little
for one line only, then it worked, so for adding second and third line pls.
revise/edit the code

I request you all to kindly advise on the above, so that I can complete this
by sending the pdf by outlookexpress 6 with the complete coding. This will
make me one click complete automatation to reach on outlook express screen
with the detail filled.

Regards

Irshad


"Patricio" wrote:

> 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@ggcompany.com"
> myItem.cc = "naaeems.gthe@ggcompany.com"
> 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@ggcompany.com"
> > myItem.cc = "naaeems.gthe@ggcompany.com"
> > 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@hotmail.com
> > > To: = irshad2.gthe@ggcompany.com
> > > CC: = naaeems.gthe@ggcompany.com
> > > 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
> > >
> > >
> > >
> > >
> > >
> > >
> > >

Reply With Quote
  #6  
Old 08-31-2008, 02:41 AM
Irshad Alam
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

pls. advise..waiting to complete it.

Regards

Irshad


"Irshad Alam" wrote:

> Thank your for advise.
>
> I copied this code and tried, but the following error occured
>
> 1. Its is opening/making the mail in Ms Outlook, While I need the same to
> be done in Outlook express 6.
>
> 2. Above when I tested, found that it is getting shortcut attached of the
> file, not the file is getting attached.
>
> 3. The body line code is not perfect, it producing error, I modified little
> for one line only, then it worked, so for adding second and third line pls.
> revise/edit the code
>
> I request you all to kindly advise on the above, so that I can complete this
> by sending the pdf by outlookexpress 6 with the complete coding. This will
> make me one click complete automatation to reach on outlook express screen
> with the detail filled.
>
> Regards
>
> Irshad
>
>
> "Patricio" wrote:
>
> > 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@ggcompany.com"
> > myItem.cc = "naaeems.gthe@ggcompany.com"
> > 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@ggcompany.com"
> > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > 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@hotmail.com
> > > > To: = irshad2.gthe@ggcompany.com
> > > > CC: = naaeems.gthe@ggcompany.com
> > > > 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
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >

Reply With Quote
  #7  
Old 09-01-2008, 09:50 AM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code


Hi, my mistake, i suppouse that you are working in Outlook, it semm to me
that i must to change the object.

Set myOlApp = CreateObject("Outlook.Application")

lets me work , i hope to help you soon

Regards


"Irshad Alam" wrote:

> pls. advise..waiting to complete it.
>
> Regards
>
> Irshad
>
>
> "Irshad Alam" wrote:
>
> > Thank your for advise.
> >
> > I copied this code and tried, but the following error occured
> >
> > 1. Its is opening/making the mail in Ms Outlook, While I need the same to
> > be done in Outlook express 6.
> >
> > 2. Above when I tested, found that it is getting shortcut attached of the
> > file, not the file is getting attached.
> >
> > 3. The body line code is not perfect, it producing error, I modified little
> > for one line only, then it worked, so for adding second and third line pls.
> > revise/edit the code
> >
> > I request you all to kindly advise on the above, so that I can complete this
> > by sending the pdf by outlookexpress 6 with the complete coding. This will
> > make me one click complete automatation to reach on outlook express screen
> > with the detail filled.
> >
> > Regards
> >
> > Irshad
> >
> >
> > "Patricio" wrote:
> >
> > > 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@ggcompany.com"
> > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > 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@ggcompany.com"
> > > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > > 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@hotmail.com
> > > > > To: = irshad2.gthe@ggcompany.com
> > > > > CC: = naaeems.gthe@ggcompany.com
> > > > > 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
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >

Reply With Quote
  #8  
Old 09-01-2008, 11:45 AM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Sorry , try this one


Sub SendMailWhitOE6()

MAPISession1.UserName = "yourname@yourmailserver.com"
MAPISession1.NewSession = True
MAPISession1.DownLoadMail = False
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID

MAPIMessages1.MsgIndex = -1 ' new message
MAPIMessages1.RecipDisplayName =
"irshad2.gthe@ggcompany.com;naaeems.gthe@ggcompany .com"

MAPIMessages1.ResolveName '
MAPIMessages1.MsgSubject = "Job-" & Me.JobNo & "-ClaimRef." &
Me.ClaimRefNo.Value
MAPIMessages1.MsgNoteText = "Reference is made to subject claim, attached
pls. find the claim form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"


MAPIMessages1.AttachmentIndex = 0 '
MAPIMessages1.AttachmentName = "Job-" & Me.JobNo & "-ClaimRef." &
Me.ClaimRefNo.Value & ".PDF"
MAPIMessages1.AttachmentPathName = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" &
Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
MAPIMessages1.AttachmentPosition = 0
MAPIMessages1.AttachmentType = 0
MAPIMessages1.Send


MAPISession1.SignOff

End Sub





"Patricio" wrote:

>
> Hi, my mistake, i suppouse that you are working in Outlook, it semm to me
> that i must to change the object.
>
> Set myOlApp = CreateObject("Outlook.Application")
>
> lets me work , i hope to help you soon
>
> Regards
>
>
> "Irshad Alam" wrote:
>
> > pls. advise..waiting to complete it.
> >
> > Regards
> >
> > Irshad
> >
> >
> > "Irshad Alam" wrote:
> >
> > > Thank your for advise.
> > >
> > > I copied this code and tried, but the following error occured
> > >
> > > 1. Its is opening/making the mail in Ms Outlook, While I need the same to
> > > be done in Outlook express 6.
> > >
> > > 2. Above when I tested, found that it is getting shortcut attached of the
> > > file, not the file is getting attached.
> > >
> > > 3. The body line code is not perfect, it producing error, I modified little
> > > for one line only, then it worked, so for adding second and third line pls.
> > > revise/edit the code
> > >
> > > I request you all to kindly advise on the above, so that I can complete this
> > > by sending the pdf by outlookexpress 6 with the complete coding. This will
> > > make me one click complete automatation to reach on outlook express screen
> > > with the detail filled.
> > >
> > > Regards
> > >
> > > Irshad
> > >
> > >
> > > "Patricio" wrote:
> > >
> > > > 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@ggcompany.com"
> > > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > > 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@ggcompany.com"
> > > > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > > > 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@hotmail.com
> > > > > > To: = irshad2.gthe@ggcompany.com
> > > > > > CC: = naaeems.gthe@ggcompany.com
> > > > > > 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
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >

Reply With Quote
  #9  
Old 09-01-2008, 03:20 PM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Is Ok??

"Patricio" wrote:

> Sorry , try this one
>
>
> Sub SendMailWhitOE6()
>
> MAPISession1.UserName = "yourname@yourmailserver.com"
> MAPISession1.NewSession = True
> MAPISession1.DownLoadMail = False
> MAPISession1.SignOn
> MAPIMessages1.SessionID = MAPISession1.SessionID
>
> MAPIMessages1.MsgIndex = -1 ' new message
> MAPIMessages1.RecipDisplayName =
> "irshad2.gthe@ggcompany.com;naaeems.gthe@ggcompany .com"
>
> MAPIMessages1.ResolveName '
> MAPIMessages1.MsgSubject = "Job-" & Me.JobNo & "-ClaimRef." &
> Me.ClaimRefNo.Value
> MAPIMessages1.MsgNoteText = "Reference is made to subject claim, attached
> pls. find the claim form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
>
>
> MAPIMessages1.AttachmentIndex = 0 '
> MAPIMessages1.AttachmentName = "Job-" & Me.JobNo & "-ClaimRef." &
> Me.ClaimRefNo.Value & ".PDF"
> MAPIMessages1.AttachmentPathName = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" &
> Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
> MAPIMessages1.AttachmentPosition = 0
> MAPIMessages1.AttachmentType = 0
> MAPIMessages1.Send
>
>
> MAPISession1.SignOff
>
> End Sub
>
>
>
>
>
> "Patricio" wrote:
>
> >
> > Hi, my mistake, i suppouse that you are working in Outlook, it semm to me
> > that i must to change the object.
> >
> > Set myOlApp = CreateObject("Outlook.Application")
> >
> > lets me work , i hope to help you soon
> >
> > Regards
> >
> >
> > "Irshad Alam" wrote:
> >
> > > pls. advise..waiting to complete it.
> > >
> > > Regards
> > >
> > > Irshad
> > >
> > >
> > > "Irshad Alam" wrote:
> > >
> > > > Thank your for advise.
> > > >
> > > > I copied this code and tried, but the following error occured
> > > >
> > > > 1. Its is opening/making the mail in Ms Outlook, While I need the same to
> > > > be done in Outlook express 6.
> > > >
> > > > 2. Above when I tested, found that it is getting shortcut attached of the
> > > > file, not the file is getting attached.
> > > >
> > > > 3. The body line code is not perfect, it producing error, I modified little
> > > > for one line only, then it worked, so for adding second and third line pls.
> > > > revise/edit the code
> > > >
> > > > I request you all to kindly advise on the above, so that I can complete this
> > > > by sending the pdf by outlookexpress 6 with the complete coding. This will
> > > > make me one click complete automatation to reach on outlook express screen
> > > > with the detail filled.
> > > >
> > > > Regards
> > > >
> > > > Irshad
> > > >
> > > >
> > > > "Patricio" wrote:
> > > >
> > > > > 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@ggcompany.com"
> > > > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > > > 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@ggcompany.com"
> > > > > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > > > > 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@hotmail.com
> > > > > > > To: = irshad2.gthe@ggcompany.com
> > > > > > > CC: = naaeems.gthe@ggcompany.com
> > > > > > > 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
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >

Reply With Quote
  #10  
Old 09-02-2008, 12:55 AM
Irshad Alam
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Hi Sir.

thank you reply. I copied from your reply and pasted the below code and it
did not work - Producing error on the first line (highlighting yellow) -
error no. : "RunTime Error 424 - Object Required":

Private Sub Label65_Click()
MAPISession1.UserName = "adhservice.gthe@galadarigroup.com"
MAPISession1.NewSession = True
MAPISession1.DownLoadMail = False
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID

MAPIMessages1.MsgIndex = -1 ' new message
MAPIMessages1.RecipDisplayName =
"irshad2.gthe@ggcompany.com;naaeems.gthe@ggcompany .com"

MAPIMessages1.ResolveName '
MAPIMessages1.MsgSubject = "Job-" & Me.JobNo & "-ClaimRef." &
Me.ClaimRefNo.Value
MAPIMessages1.MsgNoteText = "Reference is made to subject claim, attached
pls. find the claim form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
MAPIMessages1.AttachmentIndex = 0 '
MAPIMessages1.AttachmentName = "Job-" & Me.JobNo & "-ClaimRef." &
Me.ClaimRefNo.Value & ".PDF"
MAPIMessages1.AttachmentPathName = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" &
Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
MAPIMessages1.AttachmentPosition = 0
MAPIMessages1.AttachmentType = 0
MAPIMessages1.Send


MAPISession1.SignOff

End Sub

Please correct my code and advice, so that I can complete it at earliest

Regards

Irshad




"Patricio" wrote:

> Sorry , try this one
>
>
> Sub SendMailWhitOE6()
>
> MAPISession1.UserName = "yourname@yourmailserver.com"
> MAPISession1.NewSession = True
> MAPISession1.DownLoadMail = False
> MAPISession1.SignOn
> MAPIMessages1.SessionID = MAPISession1.SessionID
>
> MAPIMessages1.MsgIndex = -1 ' new message
> MAPIMessages1.RecipDisplayName =
> "irshad2.gthe@ggcompany.com;naaeems.gthe@ggcompany .com"
>
> MAPIMessages1.ResolveName '
> MAPIMessages1.MsgSubject = "Job-" & Me.JobNo & "-ClaimRef." &
> Me.ClaimRefNo.Value
> MAPIMessages1.MsgNoteText = "Reference is made to subject claim, attached
> pls. find the claim form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
>
>
> MAPIMessages1.AttachmentIndex = 0 '
> MAPIMessages1.AttachmentName = "Job-" & Me.JobNo & "-ClaimRef." &
> Me.ClaimRefNo.Value & ".PDF"
> MAPIMessages1.AttachmentPathName = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" &
> Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
> MAPIMessages1.AttachmentPosition = 0
> MAPIMessages1.AttachmentType = 0
> MAPIMessages1.Send
>
>
> MAPISession1.SignOff
>
> End Sub
>
>
>
>
>
> "Patricio" wrote:
>
> >
> > Hi, my mistake, i suppouse that you are working in Outlook, it semm to me
> > that i must to change the object.
> >
> > Set myOlApp = CreateObject("Outlook.Application")
> >
> > lets me work , i hope to help you soon
> >
> > Regards
> >
> >
> > "Irshad Alam" wrote:
> >
> > > pls. advise..waiting to complete it.
> > >
> > > Regards
> > >
> > > Irshad
> > >
> > >
> > > "Irshad Alam" wrote:
> > >
> > > > Thank your for advise.
> > > >
> > > > I copied this code and tried, but the following error occured
> > > >
> > > > 1. Its is opening/making the mail in Ms Outlook, While I need the same to
> > > > be done in Outlook express 6.
> > > >
> > > > 2. Above when I tested, found that it is getting shortcut attached of the
> > > > file, not the file is getting attached.
> > > >
> > > > 3. The body line code is not perfect, it producing error, I modified little
> > > > for one line only, then it worked, so for adding second and third line pls.
> > > > revise/edit the code
> > > >
> > > > I request you all to kindly advise on the above, so that I can complete this
> > > > by sending the pdf by outlookexpress 6 with the complete coding. This will
> > > > make me one click complete automatation to reach on outlook express screen
> > > > with the detail filled.
> > > >
> > > > Regards
> > > >
> > > > Irshad
> > > >
> > > >
> > > > "Patricio" wrote:
> > > >
> > > > > 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@ggcompany.com"
> > > > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > > > 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@ggcompany.com"
> > > > > > myItem.cc = "naaeems.gthe@ggcompany.com"
> > > > > > 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@hotmail.com
> > > > > > > To: = irshad2.gthe@ggcompany.com
> > > > > > > CC: = naaeems.gthe@ggcompany.com
> > > > > > > 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
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:39 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.