A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Task Attachments Are Not Being Displayed



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old August 17th 06, 04:02 AM posted to microsoft.public.outlook.program_vba
Nick_NZ
external usenet poster
 
Posts: 9
Default Task Attachments Are Not Being Displayed

Hi I have a program (thanks to Sue Mosher) that converts emails into tasks,
based on certain words in the subject line. It runs as an Outlook Rule.

It works fine except for the attachments. For some reason the attachments
that are being sent are not being displayed in the task that is generated.

Here is my code:


Sub MakeTaskFromMail(MyMail As Outlook.MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim olMail As Outlook.MailItem
Dim objTask As Outlook.TaskItem

strID = MyMail.EntryID

Set olNS = Application.GetNamespace("MAPI")

Set olMail = olNS.GetItemFromID(strID)

Set objTask = Application.CreateItem(olTaskItem)
With objTask
.Subject = olMail.Subject
.DueDate = DateAddW(olMail.SentOn, 5)
.ReminderTime = DateAddW(olMail.SentOn, 4)
.Importance = olImportanceHigh
.Body = olMail.Body
.Attachments = olMail.Attachments -WHERE I'M HAVING TROUBLE!

End With

olMail.Delete

objTask.Save

Set objTask = Nothing
Set olMail = Nothing
Set olNS = Nothing


End Sub


If any one can help here, it would be great!
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not open "task request" "task accepted" in Inbox LaParker Outlook - General Queries 2 August 9th 06 11:09 PM
All hours are displayed Joe W Outlook - Calandaring 1 July 27th 06 02:44 AM
show all recurrences of a task in the task list dash Outlook - Calandaring 2 April 15th 06 03:45 AM
How do I drag a task in task list of Outlook. It will not let me. rpetralia Outlook - Calandaring 2 April 5th 06 11:14 AM
Link a task to another task gary Outlook and VBA 1 January 10th 06 05:21 PM


All times are GMT +1. The time now is 09:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.