Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto Email (Access2k sr1a)

    I have a module which sends emails from Access to Outlook. If there are attachments I am using an InputBox for the filename. It occurs to me however that there may be a way to bring up the Insert File Box from Windows to find and insert the file (in the same way as you would from within Outlook). So far I have not been able to find if it is possible. Is it? And if so where do I find it?
    Thanks
    Peter

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Email (Access2k sr1a)

    Peter,

    Have a look at Call the standard Windows File Open/Save dialog box from the Access Web
    It's for Access 97 but it works in Access 2000 also.
    Francois

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Email (Access2k sr1a)

    Francois
    Thanks for that. I've copied the code you pointed me to but it looks pretty complicated so I may stick to my inputbox until I understand it better.
    It's a good site for help and ideas. Thanks again
    Peter

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Email (Access2k sr1a)

    Peter,
    You're right when you say that it looks complicated.
    But the only thing you have to do is copy the code in a new module
    Select the Menu Tools, References and uncheck reference if the are marked MISSING
    Remove or change these two lines in the GetOpenFile function:
    strFilter = ahtAddFilterItem(strFilter, _
    "Access (*.mdb)", "*.MDB;*.MDA")

    Save the module with any name but not the same name of a function in the module.
    The when you need you file to attach, just use
    MyAttachFile = GetOpenFile
    That's all.
    Francois

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Email (Access2k sr1a)

    Thanks again Francois. I'm going to try it. The reason I'm doubtful is just that I don't like to use code that I don't fully understand. If I need to adapt it I can't if I can't work out what each step does.
    Peter

  6. #6
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Email (Access2k sr1a)

    Using and analyzing code from the net is a good manner to learn new techniques.
    And if you have difficulties to adapt the code to your needs, there's always 'Woody's Lounge'
    Francois

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Email (Access2k sr1a)

    Francois
    A final thanks.
    It works great and I've even tweaked small parts of it. Nothing major of course in accordance with author's instuctions
    Peter

Posting Permissions

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