OK, there is code out there, and help:
http://www.add-in-express.com/creat...ok-object-model-propertyaccessor-storageitem/
and
https://www.pcreview.co.uk/forums/outlook-2007-read-write-out-office-settings-t3802430.html
but I'm having a few fundamental issues understanding how to save the data in the right format.
Can anyone help at all?
Pretty please?
Sub StoreData()
Dim oInbox As Folder
Dim myStorage As StorageItem
Dim myPrivateProperty As UserProperty
Dim lngOrderNumber As Long
Set oInbox = Application.Session.GetDefaultFolder(olFolderInbox)
' Get an existing instance of StorageItem by subject, or create new if it doesn't exist
Set myStorage = oInbox.GetStorage("My Private Storage", olIdentifyBySubject)
If myStorage.Size = 0 Then
'There was no existing StorageItem by this subject, so created a new one
'Create a custom property for Order Number
Set myPrivateProperty = myStorage.UserProperties.Add("Order Number", olNumber)
Else
'Assume that existing storage has the Order Number property already
Set myPrivateProperty = myStorage.UserProperties("Order Number")
End If
myPrivateProperty.Value = lngOrderNumber
myStorage.Save
End Sub
But how do I store a table in there?