Results 1 to 4 of 4

Thread: E-Mail (Acc 97)

  1. #1
    Lounger
    Join Date
    Jan 2002
    Location
    Rochester, Kent, United Kingdom
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    E-Mail (Acc 97)

    Is there an easy way to send an E-mail from an Access Form showing Name and Address details by clicking on the E-Mail field. Mailto works in HTML but I can't seem to get it to work in VBA. I'm using Outlook as my E-Mail software. Thanks Si <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: E-Mail (Acc 97)

    Have you done a Lounge Search on EMAIL? There have been quite a few threads discussing this issue. If you can't find what you want in Access, take a look in VB/VBA/.Net as well.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Feb 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: E-Mail (Acc 97)

    hi

    here is an example of creating an email message from Access.
    Make sure to set a reference to the "Microsoft Outlook 9.0 Object Library" (or any other version)

    Private Sub txtEmail_Click()
    Dim ol As New Outlook.Application
    Dim olMail As Outlook.MailItem
    Dim strCC As String

    'strCC = "someaddres@domain.com" & ";" & "anotheraddress@domain.com"


    Set olMail = ol.CreateItem(olMailItem)

    With olMail
    .To = txtEmail
    '.CC = strCC
    '.BCC = "address2@aa.com"
    '.Attachments.Add "c:somefile1.txt"
    '.Attachments.Add "c:somefile.txt"
    .Subject = "Testing"
    .Body = "This is the body..."
    .Display
    '.Send
    End With

    Set olMail = Nothing
    Set ol = Nothing

    End Sub

    cheers
    Ricky

  4. #4
    Lounger
    Join Date
    Jan 2002
    Location
    Rochester, Kent, United Kingdom
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: E-Mail (Acc 97)

    ricky

    Thanks.... Works a treat

    Si

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •