Results 1 to 3 of 3
  1. #1
    steve-bart is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2011
    Posts
    2

    Creating and Formating Outlook Task

    I am not a very experienced Access programmer, so please forgive if this a very basic question.

    I'm using the following code to generate and assign an Outlook Task. My question is; is it possible to include a table and or picture in the Task. I know that you can't use HTML in creating tasks.

    Many thanks in anticipation.

    Dim strAnsDate As String
    Dim strAnsTime As String
    Dim myOlApp As Object
    Dim myItem As Outlook.TaskItem
    Dim myDelegate As Outlook.Recipients
    Set myOlApp = CreateObject("Outlook.Application")
    Set myItem = myOlApp.CreateItem(olTaskItem)
    myItem.Recipients.Add ("Email.add")
    myItem.Subject = "Subject"
    myItem.Body = "Subject body"
    myItem.Importance = olImportanceHigh
    myItem.DueDate = #9/15/2011#
    myItem.Assign
    myItem.StartDate = Now()
    myItem.Categories = "Category"
    myItem.Save
    myItem.Send

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I've never tried to send an attachment with a task/meeting request but have you tried creating just a sample file (just put it in your c:\ drive and call it Test.txt)

    Then in your email building routine put in:

    myItem.attachment = "c:\test.txt"

    and see if it will correctly attach the file? if so then there's no reason you can't attach the contents of a table, though why you would want to do that eludes me, you may need to export the data to a file first then attach the file to the email but I haven't ever tried to attach a table to an email either

  3. #3
    steve-bart is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2011
    Posts
    2

    I need to assign a Task

    Thasnks for your reply RPEARE.
    I already use Access to send emails and harvest documents from folders and this works fine.

    What I need to do is to include on a Task data from the database in the form of a table. This is so that the recipient has all the necessary information for the Task which is being requeste.

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

Similar Threads

  1. Using ListBox value as "Body of outlook task"
    By AccessFreak in forum Database Design
    Replies: 3
    Last Post: 05-07-2011, 04:40 PM
  2. Testing Task - Forms
    By collwill in forum Access
    Replies: 1
    Last Post: 03-09-2011, 10:25 PM
  3. Update Outlook task from Access
    By timg147 in forum Programming
    Replies: 1
    Last Post: 08-16-2010, 12:27 PM
  4. Add task from Access to Outlook
    By Johan in forum Programming
    Replies: 1
    Last Post: 03-31-2010, 09:58 AM
  5. Export Access reports/query results to Outlook Calendar/Task
    By kfinpgh in forum Import/Export Data
    Replies: 0
    Last Post: 02-22-2007, 01:09 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