none
StorageItem Save Error on SharedFolder RRS feed

  • Question

  • Hi,
    I want to use the StorageItem to store application data.
    I can read but I can not write a StorageItem when the folder is open with the GetSharedFolder method !
    Is there a workaround as registry key or something else ?
    I found in Redemption  iddenItems but Read Only ?
    I have not found a solution in Ews managed Api ?
    Thank you for your answers.
    Wednesday, June 11, 2014 4:47 PM

Answers

All replies

  • Hello,

    I'd recommend asking an Exchange server administrator for writing permissions instead.

    Wednesday, June 11, 2014 5:31 PM
  • What is the exact error when you save the storage item? Is it due to lack of permissions?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, June 11, 2014 6:53 PM
  • This is not a problem of permission on Exchange Mailbox because the users have full access to the entire Mailbox.
    And the storageItem.save work when the Mailbox is added to another user account. Not Works only when access with getSharedFolder

    Thursday, June 12, 2014 7:32 AM
  • The error is "the folder is read only or this element is not authorized in this folder .."

    The error can be reproduce in Outlook vba with 3 lines of code ...

    It is not logical because gettable works on GetsharedFolder. Why ban the save?

    Thursday, June 12, 2014 7:46 AM
  • Do you get such error under all user accounts or a specific one? Did you try to use another users?

    Also you may try to use the OpenSharedFolder method of the Namespace class, for example:

    Public Sub OpenSharedHolidayCalendar() 
     Dim oNamespace As NameSpace 
     Dim oFolder As Folder 
     On Error GoTo ErrRoutine 
     Set oNamespace = Application.GetNamespace("MAPI")  
     Set oFolder = oNamespace.OpenSharedFolder( _  
     "webcal://icalx.com/public/icalshare/US32Holidays.ics")  
     oFolder.Display  
    EndRoutine: 
     On Error GoTo 0 
     Set oFolder = Nothing 
     Set oNamespace = Nothing 
    Exit Sub 
     
    ErrRoutine: 
     
     MsgBox Err.Description, vbOKOnly, Err.Number & " - " & Err.Source 
     GoTo EndRoutine  
    End Sub

    Thursday, June 12, 2014 10:17 AM
  • Thanks for your suggestion. But I d'ont want to publish these calendars(many hundred)but as for several months Outlook for mac breaks UserProperties of CustomizedPostItems, I try to implement another solution. StorageItem is ideal but ... seems to have stupid limitation.
    Thursday, June 12, 2014 12:22 PM
  • What is your code that reproduces the error?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, June 12, 2014 2:06 PM
  • I open a shared Folder with Outlook Interface

    Sub TestStorageItem()
    Dim oFolder As Folder
    Dim oFilter As String
    Set oFolder = Application.ActiveExplorer.CurrentFolder
    Set oTable = oFolder.GetTable(oFilter, Outlook.olHiddenItems)
        'Enumerate the table using test for EndOfTable
        Do Until (oTable.EndOfTable)
            Set oRow = oTable.GetNextRow()
            Debug.Print (oRow("Subject"))
            Debug.Print (oRow("LastModificationTime"))
        Loop
        ' This Works and return StorageItem Rows
    Dim oStorageItem As StorageItem
    Set oStorageItem = oFolder.GetStorage("Existing or not existing subject", olIdentifyBySubject)
    'This don't Works
    End Sub

      
    Thursday, June 12, 2014 4:21 PM
  • Take a look at the GetStorage method description in MSDN which states the following:

    GetStorage returns an error if the store type of the folder is not supported. The following stores return an error when GetStorage is called:  
    • Hotmail store

    • Internet Message Access Protocol (IMAP) stores

    • Delegate stores

    • Public folder stores

    It looks like such scenario is not supported.

    Thursday, June 12, 2014 5:15 PM
  • What is the exact error? Which method raises the error? oFolder.GetStorage?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, June 12, 2014 5:35 PM
  • Hi, Thanks for this precision, i don't found this article. Can you send me the uri.

    Friday, June 13, 2014 6:50 PM
  • See http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mapifolder.getstorage(v=office.14).aspx

    If using Redemption is an option, you can use RDOFolder.HiddenItem collection (works in all stores as long as you have access).


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by onurbb Monday, June 16, 2014 6:34 PM
    Friday, June 13, 2014 6:58 PM
  • Thanks for your responses. I would also continue to use my olds methods for application data storage.
    Monday, June 16, 2014 6:34 PM