![]() |
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
|
|||
|
|||
![]()
Greetings:
I use the following macro to automatically select a folder to save every message that I send out: Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim mySpace As Outlook.NameSpace Dim myFolder As Outlook.MAPIFolder Set mySpace = Application.GetNamespace("MAPI") Set myFolder = mySpace.PickFolder() If Not myFolder Is Nothing Then Set Item.SaveSentMessageFolder = myFolder End If Set myFolder = Nothing Set mySpace = Nothing End Sub My problem is that when I send out Appointments, the macro generates the following error: "Property is read-only" When I open Debug, the editor highlights SaveSentMessageFolder. Why does this problem occur for Appointments when standard emails work fine? What can I do to get around this error, i.e. to automatically select a Save Folder when I send appointments? Regards, Charles |
Ads |
#2
|
|||
|
|||
![]()
Test the Class property of the outgoing Item object. I think you'll want to use SaveSentMessageFolder only for outgoing messages, i.e. Item.Class = olMail. Given your results, I don't think you can make use of this property for outgoing meeting requests.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Charles in Iraq" wrote in message ... Greetings: I use the following macro to automatically select a folder to save every message that I send out: Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim mySpace As Outlook.NameSpace Dim myFolder As Outlook.MAPIFolder Set mySpace = Application.GetNamespace("MAPI") Set myFolder = mySpace.PickFolder() If Not myFolder Is Nothing Then Set Item.SaveSentMessageFolder = myFolder End If Set myFolder = Nothing Set mySpace = Nothing End Sub My problem is that when I send out Appointments, the macro generates the following error: "Property is read-only" When I open Debug, the editor highlights SaveSentMessageFolder. Why does this problem occur for Appointments when standard emails work fine? What can I do to get around this error, i.e. to automatically select a Save Folder when I send appointments? Regards, Charles |
#3
|
|||
|
|||
![]()
Okay. Thanks for your help. I guess there's no simple way
to auto save other types of outgoing message. "Sue Mosher [MVP-Outlook]" wrote: Test the Class property of the outgoing Item object. I think you'll want to use SaveSentMessageFolder only for outgoing messages, i.e. Item.Class = olMail. Given your results, I don't think you can make use of this property for outgoing meeting requests. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Charles in Iraq" wrote in message ... Greetings: I use the following macro to automatically select a folder to save every message that I send out: Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim mySpace As Outlook.NameSpace Dim myFolder As Outlook.MAPIFolder Set mySpace = Application.GetNamespace("MAPI") Set myFolder = mySpace.PickFolder() If Not myFolder Is Nothing Then Set Item.SaveSentMessageFolder = myFolder End If Set myFolder = Nothing Set mySpace = Nothing End Sub My problem is that when I send out Appointments, the macro generates the following error: "Property is read-only" When I open Debug, the editor highlights SaveSentMessageFolder. Why does this problem occur for Appointments when standard emails work fine? What can I do to get around this error, i.e. to automatically select a Save Folder when I send appointments? Regards, Charles |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2000 not sending read receipts | Greg H | Outlook - Installation | 1 | December 20th 06 04:47 PM |
Stopping Outlook sending Email Not Read messages | [email protected] | Outlook - General Queries | 0 | October 5th 06 10:03 PM |
Error using SaveSentMessageFolder | Peter | Outlook and VBA | 1 | July 11th 06 01:55 PM |
Problem with : SaveSentMessageFolder | Nader | Outlook and VBA | 10 | May 16th 06 02:19 PM |
Sending a read receipt | Fishmanboy | Outlook - General Queries | 4 | March 13th 06 04:03 PM |