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; Outlook Express is your default email program? I still working to help you, Regards "Irshad Alam" wrote: > 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 @ ...

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
Reply

 

LinkBack Thread Tools Display Modes
  #11  
Old 09-02-2008, 10:31 AM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Outlook Express is your default email program?

I still working to help you,

Regards


"Irshad Alam" wrote:

> 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
>


Reply With Quote
  #12  
Old 09-02-2008, 12:45 PM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Still trying

Sub SendMailCDO()

FromWhom = "Irshad"
AttachmentPath = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" & Me.JobNo &
"-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
Body = "Reference is made to subject claim, attached pls. find the claim
form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
Subject = "Job-" & Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value
ToWhom = "irshad2.gthe@ggcompany.com;naaeems.gthe@ggcompany .com"

Const cdoDefaults = -1
Const cdoIIS = 1
Const cdoOutlookExpress = 2

Dim Message As Object 'CDO.Message

Set Message = CreateObject("CDO.Message")

With Message
'Use default configuration from system
'until I learn otherwise

..Configuration.Load -1

..to = ToWhom
If Len(FromWhom) > 0 Then
..from = FromWhom
End If
..Subject = Subject
..TextBody = Body
If Len(AttachmentPath) > 0 Then
..AddAttachment AttachmentPath
End If

..Send
End With
End Sub


Be sure you has CDO objects registred in Access



"Patricio" wrote:

> Outlook Express is your default email program?
>
> I still working to help you,
>
> Regards
>
>
> "Irshad Alam" wrote:
>
> > 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
> >

>

Reply With Quote
  #13  
Old 09-03-2008, 04:54 AM
Irshad Alam
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Sir,

Sorry, I dont know how to register the CDO with Access. You can guide me on
this, so that I can register and test the code.

Regards

Irshad



"Patricio" wrote:

> Still trying
>
> Sub SendMailCDO()
>
> FromWhom = "Irshad"
> AttachmentPath = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" & Me.JobNo &
> "-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
> Body = "Reference is made to subject claim, attached pls. find the claim
> form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
> Subject = "Job-" & Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value
> ToWhom = "irshad2.gthe@ggcompany.com;naaeems.gthe@ggcompany .com"
>
> Const cdoDefaults = -1
> Const cdoIIS = 1
> Const cdoOutlookExpress = 2
>
> Dim Message As Object 'CDO.Message
>
> Set Message = CreateObject("CDO.Message")
>
> With Message
> 'Use default configuration from system
> 'until I learn otherwise
>
> .Configuration.Load -1
>
> .to = ToWhom
> If Len(FromWhom) > 0 Then
> .from = FromWhom
> End If
> .Subject = Subject
> .TextBody = Body
> If Len(AttachmentPath) > 0 Then
> .AddAttachment AttachmentPath
> End If
>
> .Send
> End With
> End Sub
>
>
> Be sure you has CDO objects registred in Access
>
>
>
> "Patricio" wrote:
>
> > Outlook Express is your default email program?
> >
> > I still working to help you,
> >
> > Regards
> >
> >
> > "Irshad Alam" wrote:
> >
> > > 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
> > >

> >

Reply With Quote
  #14  
Old 09-03-2008, 08:34 AM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Tri it, please

"Irshad Alam" wrote:

> Sir,
>
> Sorry, I dont know how to register the CDO with Access. You can guide me on
> this, so that I can register and test the code.
>
> Regards
>
> Irshad
>
>
>


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

Sir,

I could not understand, what to try.

Please guide.

Regards

Irshad


"Patricio" wrote:

> Tri it, please
>
> "Irshad Alam" wrote:
>
> > Sir,
> >
> > Sorry, I dont know how to register the CDO with Access. You can guide me on
> > this, so that I can register and test the code.
> >
> > Regards
> >
> > Irshad
> >
> >
> >

>

Reply With Quote
  #16  
Old 09-04-2008, 08:20 AM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Try last code , please. Then we decide

"Irshad Alam" wrote:

> Sir,
>
> I could not understand, what to try.
>
> Please guide.
>
> Regards
>
> Irshad
>
>
> "Patricio" wrote:
>
> > Tri it, please
> >
> > "Irshad Alam" wrote:
> >
> > > Sir,
> > >
> > > Sorry, I dont know how to register the CDO with Access. You can guide me on
> > > this, so that I can register and test the code.
> > >
> > > Regards
> > >
> > > Irshad
> > >
> > >
> > >

> >

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

Sir,

Still waiting for your reply.

Please advise

Regards

Irshad

"Patricio" wrote:

> Tri it, please
>
> "Irshad Alam" wrote:
>
> > Sir,
> >
> > Sorry, I dont know how to register the CDO with Access. You can guide me on
> > this, so that I can register and test the code.
> >
> > Regards
> >
> > Irshad
> >
> >
> >

>

Reply With Quote
  #18  
Old 09-08-2008, 08:20 AM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Try this please

Sub SendMailCDO()

FromWhom = "Irshad"
AttachmentPath = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" & Me.JobNo &
"-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
Body = "Reference is made to subject claim, attached pls. find the claim
form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
Subject = "Job-" & Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value
ToWhom = "irshad2.gthe@ggcompany.com;naaeems.gthe@ggcompany .com"

Const cdoDefaults = -1
Const cdoIIS = 1
Const cdoOutlookExpress = 2

Dim Message As Object 'CDO.Message

Set Message = CreateObject("CDO.Message")

With Message
'Use default configuration from system
'until I learn otherwise

.Configuration.Load -1

.to = ToWhom
If Len(FromWhom) > 0 Then
.from = FromWhom
End If
.Subject = Subject
.TextBody = Body
If Len(AttachmentPath) > 0 Then
.AddAttachment AttachmentPath
End If

.Send
End With
End Sub




"Irshad Alam" wrote:

> Sir,
>
> I could not understand, what to try.
>
> Please guide.
>
> Regards
>
> Irshad
>
>
> "Patricio" wrote:
>
> > Tri it, please
> >
> > "Irshad Alam" wrote:
> >
> > > Sir,
> > >
> > > Sorry, I dont know how to register the CDO with Access. You can guide me on
> > > this, so that I can register and test the code.
> > >
> > > Regards
> > >
> > > Irshad
> > >
> > >
> > >

> >

Reply With Quote
  #19  
Old 09-10-2008, 02:49 PM
Patricio
Guest
 
Default RE: Sending email from access - Reference Stephen Lebans code

Sorry, i think my last message was no published.

Irshad, please this the code. If didn't work i'll help you


Sub SendMailCDO()

FromWhom = "Irshad"
AttachmentPath = "C:\WsImpFiles\MyClaimedPDF\" & "Job-" & Me.JobNo &
"-ClaimRef." & Me.ClaimRefNo.Value & ".PDF"
Body = "Reference is made to subject claim, attached pls. find the claim
form as pdf" + Chr(13) + "Thanks" + Chr(13) + "Irshad"
Subject = "Job-" & Me.JobNo & "-ClaimRef." & Me.ClaimRefNo.Value
ToWhom = "irshad2.gthe@ggcompany.com;naaeems.gthe@ggcompany .com"

Const cdoDefaults = -1
Const cdoIIS = 1
Const cdoOutlookExpress = 2

Dim Message As Object 'CDO.Message

Set Message = CreateObject("CDO.Message")

With Message
'Use default configuration from system
'until I learn otherwise

.Configuration.Load -1

.to = ToWhom
If Len(FromWhom) > 0 Then
.from = FromWhom
End If
.Subject = Subject
.TextBody = Body
If Len(AttachmentPath) > 0 Then
.AddAttachment AttachmentPath
End If

.Send
End With
End Sub





"Irshad Alam" wrote:

> Sir,
>
> I could not understand, what to try.
>
> Please guide.
>
> Regards
>
> Irshad
>
>
> "Patricio" wrote:
>
> > Tri it, please
> >
> > "Irshad Alam" wrote:
> >
> > > Sir,
> > >
> > > Sorry, I dont know how to register the CDO with Access. You can guide me on
> > > this, so that I can register and test the code.
> > >
> > > Regards
> > >
> > > Irshad
> > >
> > >
> > >

> >

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

I dont have any news from my last message ( 9/10/2008 ), So i want to know if
you tryed last code thet i sendt and if it works. Please send a reply .




"Irshad Alam" wrote:

> Sir,
>
> Still waiting for your reply.
>
> Please advise
>
> Regards
>
> Irshad
>
> "Patricio" wrote:
>
> > Tri it, please
> >
> > "Irshad Alam" wrote:
> >
> > > Sir,
> > >
> > > Sorry, I dont know how to register the CDO with Access. You can guide me on
> > > this, so that I can register and test the code.
> > >
> > > Regards
> > >
> > > Irshad
> > >
> > >
> > >

> >

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 09:01 PM.


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.