Results 1 to 7 of 7
  1. #1
    Leerobo is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    5

    Send Task from Access 2013 to Outlook 2013

    Hi



    I have a form named Create Task which when completed i would like the user to be able to click a button which would then send the task to Outlook. I've found various videos on how to do this but each time i follow the instructions the functionality doesn't work. I've attached a copy of the form for reference.

    Any help with the code to create this function would be appreciated.Click image for larger version. 

Name:	Create Task.JPG 
Views:	12 
Size:	33.1 KB 
ID:	24465

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Why don't you post the code from your effort and explain how it didn't work? Hard to fix what we can't see.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Leerobo is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    5
    Hi

    See below

    Function AddOutLookTask()
    Dim appOutLook As Outlook.Application
    Dim taskOutLook As Outlook.TaskItem
    Set appOutLook = CreateObject("Outlook.Application")
    Set taskOutLook = appOutLook.CreateItem(olTaskItem)
    With taskOutLook
    .Subject = "This is the subject of my task"
    .Body = "This is the body of my task."
    .ReminderSet = True
    .ReminderTime = DateAdd("n", 2, Now) ' Set to remind us 2
    ' minutes from now.
    .DueDate = DateAdd("n", 5, Now) ' Set the due date to
    ' 5 minutes from now.
    .ReminderPlaySound = True
    'add the path to a .wav file on your computer.
    .ReminderSoundFile = "C:\Win95\media\ding.wav"
    .Save
    End With
    End Function

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    And what exactly does "doesn't work" mean? Do you get an error, if so what is it? Have you added the Outlook reference?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Leerobo is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    5
    When i click the button "Send task to Outlook" nothing happens, not even an error message. I have added the Microsoft Outlook 15.0 Object Library reference.
    Click image for larger version. 

Name:	Code.JPG 
Views:	8 
Size:	106.4 KB 
ID:	24470

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You've created a function but haven't called it. In the button's code put:

    AddOutLookTask
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Be aware that this code will create another version of the same task if it already exists.
    Edit: I believe it will present a message that might be confusing if Outlook is not open on the pc.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-21-2016, 06:20 AM
  2. Access 2013 Web App for SharePoint Send Email Macro
    By halliday4400 in forum Access
    Replies: 0
    Last Post: 02-16-2016, 06:54 PM
  3. Replies: 6
    Last Post: 10-19-2015, 06:07 PM
  4. Replies: 2
    Last Post: 08-13-2015, 02:14 PM
  5. Outlook 2013 + Access 2013 + HTML
    By Yann63 in forum Programming
    Replies: 2
    Last Post: 11-26-2013, 02:39 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