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

SaveSentMessageFolder Read Only when Sending Appointments



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 30th 07, 12:48 PM posted to microsoft.public.outlook.program_vba
Charles in Iraq
external usenet poster
 
Posts: 2
Default SaveSentMessageFolder Read Only when Sending Appointments

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  
Old March 30th 07, 03:05 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default SaveSentMessageFolder Read Only when Sending Appointments

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  
Old March 30th 07, 03:42 PM posted to microsoft.public.outlook.program_vba
Charles in Iraq
external usenet poster
 
Posts: 2
Default SaveSentMessageFolder Read Only when Sending Appointments

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
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
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


All times are GMT +1. The time now is 07:57 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.