Results 1 to 8 of 8
  1. #1
    Tench is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    4

    Generate E-mail from VBA

    Hi i have used this forum for quite a while to get answers to numerous things but never posted,

    I currently have a function behind a button that sends an e-mail to any users in my database that have tasks outstanding to prompt them on...

    I have become stuck on what i though would be an easy addition, i want to add a link in the body of the generated e-mail that will open the database but do not want to show the file path as i try to keep this unavailable to general users the link needs to show as "Technical Program" but link to "\\server\data\TechFrontend.accde"

    Heres the code i am currently using to generate the e-mail, the strEmailAddress is defined earlier in the code which is quite long but this is the only part needed to generate the e-mail



    Call Email_Via_Outlook(strEmailAddress, "Technical Program Reminder", "You have tasks to authorise in the technical program, please log in to view your job list.", True, "")

    Can anyone think of a way to do what i need?

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    If you are creating an email using HTML this will work other wise it won't but you need to add something like this:

    <a href='\\server\data\TechFrontend.accde'>Technical Program</a>

  3. #3
    Tench is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    4
    Thanks for the input JD, i have tried what you suggested and the e-mail body shows the entire text '<a href='\\server\data\TechFrontend.accde'>Technical Program</a>' when it is generated despite the HTML icon being highlighted on the outlook ribbon?

  4. #4
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274

  5. #5
    Tench is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    4
    Thanks again JD it looked promising but when i tried to use that code the OutApp, OutMail etc threw up errors, possibly this is due to the references im using to work with Access 2010/Outlook 2010?

  6. #6
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    You probably need to add the Microsoft Outlook reference. To do this open your VBA window and go to Tools/References and then scroll down and tick it.

  7. #7
    Tench is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    4
    My mistake I had messed up of the Dims, the code now works perfectly with my current references, thanks for your help!

  8. #8
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    My mistake I had messed up of the Dims, the code now works perfectly with my current references, thanks for your help!
    No problem - glad you got it sorted

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-14-2012, 10:27 AM
  2. Replies: 11
    Last Post: 09-12-2011, 11:30 AM
  3. generate next possible identifier
    By BayerMeister in forum Programming
    Replies: 5
    Last Post: 08-25-2010, 08:30 AM
  4. Pdf Report Generate from Access
    By ACHU in forum Reports
    Replies: 1
    Last Post: 10-29-2009, 07:49 AM
  5. Generate Image
    By dbman in forum Import/Export Data
    Replies: 0
    Last Post: 01-31-2008, 10:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums