Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / March 2007

Tip: Looking for answers? Try searching our database.

SaveSentMessageFolder Read Only when Sending Appointments

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles in Iraq - 30 Mar 2007 12:48 GMT
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
Sue Mosher [MVP-Outlook] - 30 Mar 2007 15:05 GMT
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.

Signature

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
 

> Greetings:
>
[quoted text clipped - 30 lines]
>
> Charles
Charles in Iraq - 30 Mar 2007 15:42 GMT
Okay.  Thanks for your help.  I guess there's no simple way
to auto save other types of outgoing message.

> 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.
>
[quoted text clipped - 32 lines]
> >
> > Charles
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.