![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
The macro below works in conjunction with a rule that copies each email I
send in a specific personal folder. As soon as the email copy is placed in the personal folder, the macro below sets UnRead = False on the email copy. This works great until I send an encrypted email. The rule copies the encrypted email to the correct personal folder but the macro fails at "Item.UnRead = False". I get a message that says "Run-time error '-2147217660 (80040F04)':" / "Method 'UnRead' of object 'MailItem' failed. Thanks in advance for any tips you can provide! ---------------------------------- Public WithEvents myOlItems2 As Outlook.Items Public Sub Application_Startup() Set myOlItems2 = Outlook.Session.Folders("Personal Folders").Folders("Inbox").Folders("Sent (2007)").Items End Sub Public Sub myOlItems2_ItemAdd(ByVal Item As Object) Dim myOlAppSub As New Outlook.Application Dim myNameSpace As Outlook.NameSpace Dim mySentFolder As Outlook.MAPIFolder Set myOlAppSub = CreateObject("Outlook.Application") Set myNameSpace = myOlAppSub.GetNamespace("MAPI") Set mySentFolder = myNameSpace.Folders("Personal Folders").Folders("Inbox").Folders("Sent (2007)") Item.UnRead = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Could not open item. Try again" error message when adding a category to a mail | Ambroise Nève | Outlook - General Queries | 6 | November 28th 07 06:08 PM |
Outlook 2007 recurring appointment error "Cannot open this item" | Kat Barnes | Outlook - Calandaring | 0 | October 22nd 07 10:42 PM |
"Unread Messages" in Outlook 2007 | Truewarrior | Outlook - Installation | 2 | May 23rd 07 08:18 PM |
I get a false "Windows - No Disk" error. Fix? | DET | Outlook - Installation | 10 | January 12th 07 06:19 PM |
Restor "Unread Messages" folder! | Noel All | Outlook - Installation | 1 | March 20th 06 01:15 PM |