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