Using Outlook in Access 2000 
Author Message
 Using Outlook in Access 2000

I want to send and email through outlook to a known address, with a known attachment, by pressing a button in access.  what is the simplest way to do this?  Which reference libraries do I need?

TIA

Dan




Sun, 18 Jan 2004 03:33:58 GMT  
 Using Outlook in Access 2000

you need to include the "Microsoft Outlook 9.0 Object
Library"

there is more information on the web at
http://objects.devx.com/

I know it can be done verey easily in a few lines of code
because I have done it in the past but I can not recall
how.

good luck

Michel

Quote:
>-----Original Message-----
>I want to send and email through outlook to a known

address, with a known attachment, by pressing a button in
access.  what is the simplest way to do this?  Which
reference libraries do I need?
Quote:

>TIA

>Dan


>.



Mon, 19 Jan 2004 22:53:54 GMT  
 Using Outlook in Access 2000

here is some sample code to do it

    Dim m As MailItem  'reserve memory space for the
                        new message

    ' create the new message    
    Set m = Outlook.CreateItem(olMailItem)

    'add the atatchment
    m.Attachments.Add "atatchement.txt"

    'the text you want in the body of your email
    m.Body = "body text"                

    ' the address that you want the email to be sent to

    'send the email
    m.Send

you have to add the outlook reference to your project

hope this helps

Michel

Quote:
>-----Original Message-----
>I want to send and email through outlook to a known

address, with a known attachment, by pressing a button in
access.  what is the simplest way to do this?  Which
reference libraries do I need?
Quote:

>TIA

>Dan


>.



Mon, 19 Jan 2004 23:11:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. using outlook in access 2000

2. Using a access database with Outlook 2000 as interface

3. Access 97/2000 and Outlook 2000 Conflict?!

4. Access 2000 and Outlook 2000

5. Synchronize Outlook 2000 and Access 2000

6. Linking Access 2000 Table to Outlook 2000 Tasks

7. Faxing from Access 2000 (or maybe Outlook 2000)

8. Access 2000 append query run from Outlook 2000 fails - no error message - REPOST

9. Automating email function within Word 2000 using Access 2000

10. Need Help Manipulating Excel 2000 from Access 2000 using VBA

11. App in VB5 using Access97 incompatible with machine using Access 2000

 

 
Powered by phpBB® Forum Software