SaveSentMessageFolder Read Only when Sending Appointments

C

Charles in Iraq

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
 
S

Sue Mosher [MVP-Outlook]

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

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
C

Charles in Iraq

Okay. Thanks for your help. I guess there's no simple way
to auto save other types of outgoing message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top