PC Review


Reply
Thread Tools Rate Thread

Adding other email address to the DoCmd.SendOject

 
 
Chi
Guest
Posts: n/a
 
      29th Oct 2008

Hi,

The DoCmd.SendObject below works fine. Would you please show me how I can
add another email address to it. Ex: (E-Mail Removed).



Private Sub EmailRequest_Click()
DoCmd.SendObject _
, _
, _
, _
"(E-Mail Removed)", _
, _
, _
"Secretary Request No. ", _
"If you could take a look at this, deeply appreciate it! THX!" &
vbCrLf & " ", _
True
DoCmd.Close
End Sub
----------------------------------------


Thanks
Chi

 
Reply With Quote
 
 
 
 
Daniel Pineault
Guest
Posts: n/a
 
      29th Oct 2008
Nothing could be simpler. If you look at the help file you see they specify:
" Separate the recipient names you specify in this argument and in the cc
and bcc arguments with a semicolon ("

So try something like
....
"(E-Mail Removed);(E-Mail Removed)",
....

--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Chi" wrote:

>
> Hi,
>
> The DoCmd.SendObject below works fine. Would you please show me how I can
> add another email address to it. Ex: (E-Mail Removed).
>
>
>
> Private Sub EmailRequest_Click()
> DoCmd.SendObject _
> , _
> , _
> , _
> "(E-Mail Removed)", _
> , _
> , _
> "Secretary Request No. ", _
> "If you could take a look at this, deeply appreciate it! THX!" &
> vbCrLf & " ", _
> True
> DoCmd.Close
> End Sub
> ----------------------------------------
>
>
> Thanks
> Chi
>

 
Reply With Quote
 
Chi
Guest
Posts: n/a
 
      29th Oct 2008
Hi Daniel,

Thank you for the quick response! After using the "; " to add the another
email adress to the DoCmd.SendOject, I can sent to both!!. I understand that
everything is not simple. Moreover, I don't have back ground in coding.
Therefore everthing is harder...

Would you please.. please help me if I want to sent email for either one.
Ex: I would like to sent email to Sue only.

Thanks
Chi

"Daniel Pineault" wrote:

> Nothing could be simpler. If you look at the help file you see they specify:
> " Separate the recipient names you specify in this argument and in the cc
> and bcc arguments with a semicolon ("
>
> So try something like
> ...
> "(E-Mail Removed);(E-Mail Removed)",
> ...
>
> --
> Hope this helps,
>
> Daniel Pineault
> http://www.cardaconsultants.com/
> For Access Tips and Examples: http://www.devhut.net
> Please rate this post using the vote buttons if it was helpful.
>
>
>
> "Chi" wrote:
>
> >
> > Hi,
> >
> > The DoCmd.SendObject below works fine. Would you please show me how I can
> > add another email address to it. Ex: (E-Mail Removed).
> >
> >
> >
> > Private Sub EmailRequest_Click()
> > DoCmd.SendObject _
> > , _
> > , _
> > , _
> > "(E-Mail Removed)", _
> > , _
> > , _
> > "Secretary Request No. ", _
> > "If you could take a look at this, deeply appreciate it! THX!" &
> > vbCrLf & " ", _
> > True
> > DoCmd.Close
> > End Sub
> > ----------------------------------------
> >
> >
> > Thanks
> > Chi
> >

 
Reply With Quote
 
Chi
Guest
Posts: n/a
 
      29th Oct 2008
Hi Daniel,

I would like to let you know that I didn't create the DoCmd. SendOject.
Someone else do it. The original coding has two email addresses in the
argument, but I took one out. I remember that the other email address located
above the current one. I took it out and now I don't know how to put it
back since I did it for a few months ago.
I always get error messages since I don’t know anything about coding. sorry.
Thank you so much
Chi

"Daniel Pineault" wrote:

> Nothing could be simpler. If you look at the help file you see they specify:
> " Separate the recipient names you specify in this argument and in the cc
> and bcc arguments with a semicolon ("
>
> So try something like
> ...
> "(E-Mail Removed);(E-Mail Removed)",
> ...
>
> --
> Hope this helps,
>
> Daniel Pineault
> http://www.cardaconsultants.com/
> For Access Tips and Examples: http://www.devhut.net
> Please rate this post using the vote buttons if it was helpful.
>
>
>
> "Chi" wrote:
>
> >
> > Hi,
> >
> > The DoCmd.SendObject below works fine. Would you please show me how I can
> > add another email address to it. Ex: (E-Mail Removed).
> >
> >
> >
> > Private Sub EmailRequest_Click()
> > DoCmd.SendObject _
> > , _
> > , _
> > , _
> > "(E-Mail Removed)", _
> > , _
> > , _
> > "Secretary Request No. ", _
> > "If you could take a look at this, deeply appreciate it! THX!" &
> > vbCrLf & " ", _
> > True
> > DoCmd.Close
> > End Sub
> > ----------------------------------------
> >
> >
> > Thanks
> > Chi
> >

 
Reply With Quote
 
Daniel Pineault
Guest
Posts: n/a
 
      29th Oct 2008
I('m not sure if I understood the question properly. If your want to have a
routine the selectively send an e-mail to one individual or another based on
a criteria you'd need to create an if statement

***********
Dim sSubject As String
Dim sMessage As String
Dim sRecipient As String

If YourCriteria Then
sRecipient = "(E-Mail Removed)"
Else
sRecipient = "(E-Mail Removed)"
End If

sSubject = "Secretary Request No. "
sMessage = "If you could take a look at this, deeply appreciate it!
THX!" & vbCrLf & " "

DoCmd.SendObject , , , sRecipient, , , sSubject, sMessage, True
DoCmd.Close
*********

You could also send each e-mail message separatly, ie:

*********
Dim sSubject As String
Dim sMessage As String

sSubject = "Secretary Request No. "
sMessage = "If you could take a look at this, deeply appreciate it!
THX!" & vbCrLf & " "

DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage,
True
DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage, True
DoCmd.Close
*********

If this isn't what you need, please explain more and I'm sure I can help you
out.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Chi" wrote:

> Hi Daniel,
>
> I would like to let you know that I didn't create the DoCmd. SendOject.
> Someone else do it. The original coding has two email addresses in the
> argument, but I took one out. I remember that the other email address located
> above the current one. I took it out and now I don't know how to put it
> back since I did it for a few months ago.
> I always get error messages since I don’t know anything about coding. sorry.
> Thank you so much
> Chi
>
> "Daniel Pineault" wrote:
>
> > Nothing could be simpler. If you look at the help file you see they specify:
> > " Separate the recipient names you specify in this argument and in the cc
> > and bcc arguments with a semicolon ("
> >
> > So try something like
> > ...
> > "(E-Mail Removed);(E-Mail Removed)",
> > ...
> >
> > --
> > Hope this helps,
> >
> > Daniel Pineault
> > http://www.cardaconsultants.com/
> > For Access Tips and Examples: http://www.devhut.net
> > Please rate this post using the vote buttons if it was helpful.
> >
> >
> >
> > "Chi" wrote:
> >
> > >
> > > Hi,
> > >
> > > The DoCmd.SendObject below works fine. Would you please show me how I can
> > > add another email address to it. Ex: (E-Mail Removed).
> > >
> > >
> > >
> > > Private Sub EmailRequest_Click()
> > > DoCmd.SendObject _
> > > , _
> > > , _
> > > , _
> > > "(E-Mail Removed)", _
> > > , _
> > > , _
> > > "Secretary Request No. ", _
> > > "If you could take a look at this, deeply appreciate it! THX!" &
> > > vbCrLf & " ", _
> > > True
> > > DoCmd.Close
> > > End Sub
> > > ----------------------------------------
> > >
> > >
> > > Thanks
> > > Chi
> > >

 
Reply With Quote
 
Chi
Guest
Posts: n/a
 
      30th Oct 2008
Good Moring Daniel,

Thank you so so much for your help!! I tried both ways!

I would like to work with the first method - Use if then else. However,
I don't know what the criteria is and the (sMessage = "If you could take a
look at this, deeply appreciate it! THX!" & vbCrLf & " ") is not correct. It
turned red when I used them.

I would like to explain more about my work:

The users enter information to the REQUEST Form that has Instructor name,
Requested to and Project title fields. The users can pick the name listed in
the drop out list. Ex: they can choose Sue or Oanh who are going to help them.

Before hitting the Sending Request button which has the SentObjet action,
they must select the tree fields: Instructor name, Requested to and Project
title fields.

Ex: if they choose "Sue" from the REQUESTED TO's drop out list, the email
will sent to SUE only, not both "SUE and OANH" .

I think that the criteria should be "the name selected on the REQUESTED TO
list", but I don't know what to replace "your criteria” in the codes you gave
to me.


I am very appreciated for all your help!
Chi



"Daniel Pineault" wrote:

> I('m not sure if I understood the question properly. If your want to have a
> routine the selectively send an e-mail to one individual or another based on
> a criteria you'd need to create an if statement
>
> ***********
> Dim sSubject As String
> Dim sMessage As String
> Dim sRecipient As String
>
> If YourCriteria Then
> sRecipient = "(E-Mail Removed)"
> Else
> sRecipient = "(E-Mail Removed)"
> End If
>
> sSubject = "Secretary Request No. "
> sMessage = "If you could take a look at this, deeply appreciate it!
> THX!" & vbCrLf & " "
>
> DoCmd.SendObject , , , sRecipient, , , sSubject, sMessage, True
> DoCmd.Close
> *********
>
> You could also send each e-mail message separatly, ie:
>
> *********
> Dim sSubject As String
> Dim sMessage As String
>
> sSubject = "Secretary Request No. "
> sMessage = "If you could take a look at this, deeply appreciate it!
> THX!" & vbCrLf & " "
>
> DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage,
> True
> DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage, True
> DoCmd.Close
> *********
>
> If this isn't what you need, please explain more and I'm sure I can help you
> out.
> --
> Hope this helps,
>
> Daniel Pineault
> http://www.cardaconsultants.com/
> For Access Tips and Examples: http://www.devhut.net
> Please rate this post using the vote buttons if it was helpful.
>
>
>
> "Chi" wrote:
>
> > Hi Daniel,
> >
> > I would like to let you know that I didn't create the DoCmd. SendOject.
> > Someone else do it. The original coding has two email addresses in the
> > argument, but I took one out. I remember that the other email address located
> > above the current one. I took it out and now I don't know how to put it
> > back since I did it for a few months ago.
> > I always get error messages since I don’t know anything about coding. sorry.
> > Thank you so much
> > Chi
> >
> > "Daniel Pineault" wrote:
> >
> > > Nothing could be simpler. If you look at the help file you see they specify:
> > > " Separate the recipient names you specify in this argument and in the cc
> > > and bcc arguments with a semicolon ("
> > >
> > > So try something like
> > > ...
> > > "(E-Mail Removed);(E-Mail Removed)",
> > > ...
> > >
> > > --
> > > Hope this helps,
> > >
> > > Daniel Pineault
> > > http://www.cardaconsultants.com/
> > > For Access Tips and Examples: http://www.devhut.net
> > > Please rate this post using the vote buttons if it was helpful.
> > >
> > >
> > >
> > > "Chi" wrote:
> > >
> > > >
> > > > Hi,
> > > >
> > > > The DoCmd.SendObject below works fine. Would you please show me how I can
> > > > add another email address to it. Ex: (E-Mail Removed).
> > > >
> > > >
> > > >
> > > > Private Sub EmailRequest_Click()
> > > > DoCmd.SendObject _
> > > > , _
> > > > , _
> > > > , _
> > > > "(E-Mail Removed)", _
> > > > , _
> > > > , _
> > > > "Secretary Request No. ", _
> > > > "If you could take a look at this, deeply appreciate it! THX!" &
> > > > vbCrLf & " ", _
> > > > True
> > > > DoCmd.Close
> > > > End Sub
> > > > ----------------------------------------
> > > >
> > > >
> > > > Thanks
> > > > Chi
> > > >

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      30th Oct 2008
There was word-wrap in Daniel's response. The line of text you quote should
be a single line.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Chi" <(E-Mail Removed)> wrote in message
news:B1EBEC66-DAD9-4764-95C3-(E-Mail Removed)...
> Good Moring Daniel,
>
> Thank you so so much for your help!! I tried both ways!
>
> I would like to work with the first method - Use if then else. However,
> I don't know what the criteria is and the (sMessage = "If you could take a
> look at this, deeply appreciate it! THX!" & vbCrLf & " ") is not correct.
> It
> turned red when I used them.
>
> I would like to explain more about my work:
>
> The users enter information to the REQUEST Form that has Instructor name,
> Requested to and Project title fields. The users can pick the name listed
> in
> the drop out list. Ex: they can choose Sue or Oanh who are going to help
> them.
>
> Before hitting the Sending Request button which has the SentObjet action,
> they must select the tree fields: Instructor name, Requested to and
> Project
> title fields.
>
> Ex: if they choose "Sue" from the REQUESTED TO's drop out list, the email
> will sent to SUE only, not both "SUE and OANH" .
>
> I think that the criteria should be "the name selected on the REQUESTED TO
> list", but I don't know what to replace "your criteria" in the codes you
> gave
> to me.
>
>
> I am very appreciated for all your help!
> Chi
>
>
>
> "Daniel Pineault" wrote:
>
>> I('m not sure if I understood the question properly. If your want to
>> have a
>> routine the selectively send an e-mail to one individual or another based
>> on
>> a criteria you'd need to create an if statement
>>
>> ***********
>> Dim sSubject As String
>> Dim sMessage As String
>> Dim sRecipient As String
>>
>> If YourCriteria Then
>> sRecipient = "(E-Mail Removed)"
>> Else
>> sRecipient = "(E-Mail Removed)"
>> End If
>>
>> sSubject = "Secretary Request No. "
>> sMessage = "If you could take a look at this, deeply appreciate it!
>> THX!" & vbCrLf & " "
>>
>> DoCmd.SendObject , , , sRecipient, , , sSubject, sMessage, True
>> DoCmd.Close
>> *********
>>
>> You could also send each e-mail message separatly, ie:
>>
>> *********
>> Dim sSubject As String
>> Dim sMessage As String
>>
>> sSubject = "Secretary Request No. "
>> sMessage = "If you could take a look at this, deeply appreciate it!
>> THX!" & vbCrLf & " "
>>
>> DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject,
>> sMessage,
>> True
>> DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage,
>> True
>> DoCmd.Close
>> *********
>>
>> If this isn't what you need, please explain more and I'm sure I can help
>> you
>> out.
>> --
>> Hope this helps,
>>
>> Daniel Pineault
>> http://www.cardaconsultants.com/
>> For Access Tips and Examples: http://www.devhut.net
>> Please rate this post using the vote buttons if it was helpful.
>>
>>
>>
>> "Chi" wrote:
>>
>> > Hi Daniel,
>> >
>> > I would like to let you know that I didn't create the DoCmd. SendOject.
>> > Someone else do it. The original coding has two email addresses in the
>> > argument, but I took one out. I remember that the other email address
>> > located
>> > above the current one. I took it out and now I don't know how to put
>> > it
>> > back since I did it for a few months ago.
>> > I always get error messages since I don't know anything about coding.
>> > sorry.
>> > Thank you so much
>> > Chi
>> >
>> > "Daniel Pineault" wrote:
>> >
>> > > Nothing could be simpler. If you look at the help file you see they
>> > > specify:
>> > > " Separate the recipient names you specify in this argument and in
>> > > the cc
>> > > and bcc arguments with a semicolon ("
>> > >
>> > > So try something like
>> > > ...
>> > > "(E-Mail Removed);(E-Mail Removed)",
>> > > ...
>> > >
>> > > --
>> > > Hope this helps,
>> > >
>> > > Daniel Pineault
>> > > http://www.cardaconsultants.com/
>> > > For Access Tips and Examples: http://www.devhut.net
>> > > Please rate this post using the vote buttons if it was helpful.
>> > >
>> > >
>> > >
>> > > "Chi" wrote:
>> > >
>> > > >
>> > > > Hi,
>> > > >
>> > > > The DoCmd.SendObject below works fine. Would you please show me how
>> > > > I can
>> > > > add another email address to it. Ex: (E-Mail Removed).
>> > > >
>> > > >
>> > > >
>> > > > Private Sub EmailRequest_Click()
>> > > > DoCmd.SendObject _
>> > > > , _
>> > > > , _
>> > > > , _
>> > > > "(E-Mail Removed)", _
>> > > > , _
>> > > > , _
>> > > > "Secretary Request No. ", _
>> > > > "If you could take a look at this, deeply appreciate it!
>> > > > THX!" &
>> > > > vbCrLf & " ", _
>> > > > True
>> > > > DoCmd.Close
>> > > > End Sub
>> > > > ----------------------------------------
>> > > >
>> > > >
>> > > > Thanks
>> > > > Chi
>> > > >



 
Reply With Quote
 
Chi
Guest
Posts: n/a
 
      31st Oct 2008
Hi Douglas,

Thanks for your help! I will try it again and let you know.

Chi

"Douglas J. Steele" wrote:

> There was word-wrap in Daniel's response. The line of text you quote should
> be a single line.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Chi" <(E-Mail Removed)> wrote in message
> news:B1EBEC66-DAD9-4764-95C3-(E-Mail Removed)...
> > Good Moring Daniel,
> >
> > Thank you so so much for your help!! I tried both ways!
> >
> > I would like to work with the first method - Use if then else. However,
> > I don't know what the criteria is and the (sMessage = "If you could take a
> > look at this, deeply appreciate it! THX!" & vbCrLf & " ") is not correct.
> > It
> > turned red when I used them.
> >
> > I would like to explain more about my work:
> >
> > The users enter information to the REQUEST Form that has Instructor name,
> > Requested to and Project title fields. The users can pick the name listed
> > in
> > the drop out list. Ex: they can choose Sue or Oanh who are going to help
> > them.
> >
> > Before hitting the Sending Request button which has the SentObjet action,
> > they must select the tree fields: Instructor name, Requested to and
> > Project
> > title fields.
> >
> > Ex: if they choose "Sue" from the REQUESTED TO's drop out list, the email
> > will sent to SUE only, not both "SUE and OANH" .
> >
> > I think that the criteria should be "the name selected on the REQUESTED TO
> > list", but I don't know what to replace "your criteria" in the codes you
> > gave
> > to me.
> >
> >
> > I am very appreciated for all your help!
> > Chi
> >
> >
> >
> > "Daniel Pineault" wrote:
> >
> >> I('m not sure if I understood the question properly. If your want to
> >> have a
> >> routine the selectively send an e-mail to one individual or another based
> >> on
> >> a criteria you'd need to create an if statement
> >>
> >> ***********
> >> Dim sSubject As String
> >> Dim sMessage As String
> >> Dim sRecipient As String
> >>
> >> If YourCriteria Then
> >> sRecipient = "(E-Mail Removed)"
> >> Else
> >> sRecipient = "(E-Mail Removed)"
> >> End If
> >>
> >> sSubject = "Secretary Request No. "
> >> sMessage = "If you could take a look at this, deeply appreciate it!
> >> THX!" & vbCrLf & " "
> >>
> >> DoCmd.SendObject , , , sRecipient, , , sSubject, sMessage, True
> >> DoCmd.Close
> >> *********
> >>
> >> You could also send each e-mail message separatly, ie:
> >>
> >> *********
> >> Dim sSubject As String
> >> Dim sMessage As String
> >>
> >> sSubject = "Secretary Request No. "
> >> sMessage = "If you could take a look at this, deeply appreciate it!
> >> THX!" & vbCrLf & " "
> >>
> >> DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject,
> >> sMessage,
> >> True
> >> DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage,
> >> True
> >> DoCmd.Close
> >> *********
> >>
> >> If this isn't what you need, please explain more and I'm sure I can help
> >> you
> >> out.
> >> --
> >> Hope this helps,
> >>
> >> Daniel Pineault
> >> http://www.cardaconsultants.com/
> >> For Access Tips and Examples: http://www.devhut.net
> >> Please rate this post using the vote buttons if it was helpful.
> >>
> >>
> >>
> >> "Chi" wrote:
> >>
> >> > Hi Daniel,
> >> >
> >> > I would like to let you know that I didn't create the DoCmd. SendOject.
> >> > Someone else do it. The original coding has two email addresses in the
> >> > argument, but I took one out. I remember that the other email address
> >> > located
> >> > above the current one. I took it out and now I don't know how to put
> >> > it
> >> > back since I did it for a few months ago.
> >> > I always get error messages since I don't know anything about coding.
> >> > sorry.
> >> > Thank you so much
> >> > Chi
> >> >
> >> > "Daniel Pineault" wrote:
> >> >
> >> > > Nothing could be simpler. If you look at the help file you see they
> >> > > specify:
> >> > > " Separate the recipient names you specify in this argument and in
> >> > > the cc
> >> > > and bcc arguments with a semicolon ("
> >> > >
> >> > > So try something like
> >> > > ...
> >> > > "(E-Mail Removed);(E-Mail Removed)",
> >> > > ...
> >> > >
> >> > > --
> >> > > Hope this helps,
> >> > >
> >> > > Daniel Pineault
> >> > > http://www.cardaconsultants.com/
> >> > > For Access Tips and Examples: http://www.devhut.net
> >> > > Please rate this post using the vote buttons if it was helpful.
> >> > >
> >> > >
> >> > >
> >> > > "Chi" wrote:
> >> > >
> >> > > >
> >> > > > Hi,
> >> > > >
> >> > > > The DoCmd.SendObject below works fine. Would you please show me how
> >> > > > I can
> >> > > > add another email address to it. Ex: (E-Mail Removed).
> >> > > >
> >> > > >
> >> > > >
> >> > > > Private Sub EmailRequest_Click()
> >> > > > DoCmd.SendObject _
> >> > > > , _
> >> > > > , _
> >> > > > , _
> >> > > > "(E-Mail Removed)", _
> >> > > > , _
> >> > > > , _
> >> > > > "Secretary Request No. ", _
> >> > > > "If you could take a look at this, deeply appreciate it!
> >> > > > THX!" &
> >> > > > vbCrLf & " ", _
> >> > > > True
> >> > > > DoCmd.Close
> >> > > > End Sub
> >> > > > ----------------------------------------
> >> > > >
> >> > > >
> >> > > > Thanks
> >> > > > Chi
> >> > > >

>
>
>

 
Reply With Quote
 
Chi
Guest
Posts: n/a
 
      3rd Nov 2008
Hi Daniel,

I tried working with your codes. I think that it works since after clicking
the Send button, the outlook is opened. However, It didn't either add chi's
email nor Sue's email in it. Therefore, I continue working on the "criteria"
to put in the If statement.

Here is my work:
The table has the field named "RequestedTo" stored the names like Chi and
Sue that use for the drop out list on the form. When users choose Chi and hit
the Send button, the outlook will be open and add the Chi's email address in
there.

I tried to add Dim RequestedTo as String to the code and the "criteria" is
RequestedTo = "chi"

So the final codes will be:

Dim sSubject As String
> Dim sMessage As String
> Dim sRecipient As String
> Dim Requested To As String


> If RequestedTo="chi" Then
> sRecipient = "(E-Mail Removed)"

Else
> sRecipient = "(E-Mail Removed)"
> End If
>
> sSubject = "Secretary Request No. "
> sMessage = "If you could take a look at this, deeply appreciate it!
> THX!" & vbCrLf & " "
>
> DoCmd.SendObject , , , sRecipient, , , sSubject, sMessage, True
> DoCmd.Close


-------
Please take a look at the codes and let me know what do you think?


Please help!
Thanks
Chi
Thanks
Chi


"Daniel Pineault" wrote:

> I('m not sure if I understood the question properly. If your want to have a
> routine the selectively send an e-mail to one individual or another based on
> a criteria you'd need to create an if statement
>
> ***********
> Dim sSubject As String
> Dim sMessage As String
> Dim sRecipient As String
>
> If YourCriteria Then
> sRecipient = "(E-Mail Removed)"
> Else
> sRecipient = "(E-Mail Removed)"
> End If
>
> sSubject = "Secretary Request No. "
> sMessage = "If you could take a look at this, deeply appreciate it!
> THX!" & vbCrLf & " "
>
> DoCmd.SendObject , , , sRecipient, , , sSubject, sMessage, True
> DoCmd.Close
> *********
>
> You could also send each e-mail message separatly, ie:
>
> *********
> Dim sSubject As String
> Dim sMessage As String
>
> sSubject = "Secretary Request No. "
> sMessage = "If you could take a look at this, deeply appreciate it!
> THX!" & vbCrLf & " "
>
> DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage,
> True
> DoCmd.SendObject , , , "(E-Mail Removed)", , , sSubject, sMessage, True
> DoCmd.Close
> *********
>
> If this isn't what you need, please explain more and I'm sure I can help you
> out.
> --
> Hope this helps,
>
> Daniel Pineault
> http://www.cardaconsultants.com/
> For Access Tips and Examples: http://www.devhut.net
> Please rate this post using the vote buttons if it was helpful.
>
>
>
> "Chi" wrote:
>
> > Hi Daniel,
> >
> > I would like to let you know that I didn't create the DoCmd. SendOject.
> > Someone else do it. The original coding has two email addresses in the
> > argument, but I took one out. I remember that the other email address located
> > above the current one. I took it out and now I don't know how to put it
> > back since I did it for a few months ago.
> > I always get error messages since I don’t know anything about coding. sorry.
> > Thank you so much
> > Chi
> >
> > "Daniel Pineault" wrote:
> >
> > > Nothing could be simpler. If you look at the help file you see they specify:
> > > " Separate the recipient names you specify in this argument and in the cc
> > > and bcc arguments with a semicolon ("
> > >
> > > So try something like
> > > ...
> > > "(E-Mail Removed);(E-Mail Removed)",
> > > ...
> > >
> > > --
> > > Hope this helps,
> > >
> > > Daniel Pineault
> > > http://www.cardaconsultants.com/
> > > For Access Tips and Examples: http://www.devhut.net
> > > Please rate this post using the vote buttons if it was helpful.
> > >
> > >
> > >
> > > "Chi" wrote:
> > >
> > > >
> > > > Hi,
> > > >
> > > > The DoCmd.SendObject below works fine. Would you please show me how I can
> > > > add another email address to it. Ex: (E-Mail Removed).
> > > >
> > > >
> > > >
> > > > Private Sub EmailRequest_Click()
> > > > DoCmd.SendObject _
> > > > , _
> > > > , _
> > > > , _
> > > > "(E-Mail Removed)", _
> > > > , _
> > > > , _
> > > > "Secretary Request No. ", _
> > > > "If you could take a look at this, deeply appreciate it! THX!" &
> > > > vbCrLf & " ", _
> > > > True
> > > > DoCmd.Close
> > > > End Sub
> > > > ----------------------------------------
> > > >
> > > >
> > > > Thanks
> > > > Chi
> > > >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Email Adding mistagged email address SJMP Microsoft Outlook Discussion 4 19th Jun 2009 04:59 PM
adding a 2nd email address Martymac Microsoft Outlook Discussion 2 28th Aug 2008 10:22 AM
Adding an inbox email address to address book Craig Microsoft Outlook 1 7th Feb 2005 10:41 PM
Adding an email address to Personal Address Book =?Utf-8?B?UGxheWluZyBXTUEgZmlsZXMgaW4gc3F1ZW5jZQ== Microsoft Outlook Discussion 3 25th Oct 2004 06:25 PM
adding email address Emma Microsoft Outlook 1 27th Aug 2003 12:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:10 AM.