Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

Sending email

Discussion in 'Information Technology' started by SF, Jul 28, 2006.

Tags:
  1. SF

    SF
    Expand Collapse
    Guest

    Hi,

    The following code send an email out directly to the receipient. Is there a
    way to let user type the subject and body of the email before sending out.



    Private Sub Option2_Click()
    On Error GoTo Err_btnSendMail_Click

    DoCmd.Hourglass True
    Dim olApp As Outlook.Application
    Dim olMsg As Outlook.MailItem

    Set olApp = New Outlook.Application
    Set olMsg = CreateItem(olMailItem)

    With olMsg
    .To = Me.Co_EMail
    .Subject = "cmd Buttom Testing..."
    .Body = "Hey delete me now"
    .Send
    End With
    DoCmd.Hourglass False
    Exit_btnSendMail_Click:
    Exit Sub

    Err_btnSendMail_Click:
    MsgBox Err.Number & " " & Err.Description, vbOKOnly + vbInformation
    Resume Exit_btnSendMail_Click
    End Sub

    Sf
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Why This Sikh Cartoonist Is Sending A Postcard To Trump Every Day Breaking News Mar 23, 2016
    Canada Canada sending dossier on fraud immigration agents to Punjab Breaking News Sep 27, 2010
    Controversial Man stands by email: "Lose the traditions, or stay in India" Hard Talk Aug 11, 2012
    Disgusting email about asthma, MS, ADD and autism Parenting Aug 10, 2011
    Man uses Facebook to hack women's email Hard Talk Jan 15, 2011

  3. Terry Kreft

    Terry Kreft
    Expand Collapse
    Guest

    Provide a form with a couple of textboxes where thy can type in what ou want
    them to type nd thn use the valu of te txt fields instead of your hardcoded
    strings.

    You can turn off the recordselectors and navigation buttons etc to make the
    form look fit for the purpose.


    --

    Terry Kreft


    "SF" <ssamnang@yahoo.com> wrote in message
    news:OJJdcPZmGHA.3980@TK2MSFTNGP02.phx.gbl...
    > Hi,
    >
    > The following code send an email out directly to the receipient. Is there

    a
    > way to let user type the subject and body of the email before sending out.
    >
    >
    >
    > Private Sub Option2_Click()
    > On Error GoTo Err_btnSendMail_Click
    >
    > DoCmd.Hourglass True
    > Dim olApp As Outlook.Application
    > Dim olMsg As Outlook.MailItem
    >
    > Set olApp = New Outlook.Application
    > Set olMsg = CreateItem(olMailItem)
    >
    > With olMsg
    > .To = Me.Co_EMail
    > .Subject = "cmd Buttom Testing..."
    > .Body = "Hey delete me now"
    > .Send
    > End With
    > DoCmd.Hourglass False
    > Exit_btnSendMail_Click:
    > Exit Sub
    >
    > Err_btnSendMail_Click:
    > MsgBox Err.Number & " " & Err.Description, vbOKOnly + vbInformation
    > Resume Exit_btnSendMail_Click
    > End Sub
    >
    > Sf
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page