• Auto Email (Access2k sr1a)

    Author
    Topic
    #370675

    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

    Viewing 0 reply threads
    Author
    Replies
    • #587136

      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.

      • #587244

        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

        • #587253

          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.

          • #587401

            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

            • #587416

              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’

            • #587432

              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

    Viewing 0 reply threads
    Reply To: Auto Email (Access2k sr1a)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: