outlook - mailitem.Save The operation cannot be completed because the objct has been deleted -


i'm trying make copy of mailitem, move copy different location , add custom item property it. after add custom property, item wont save , crash error mentionned above.

here's code, me figure out please!

dim objcopieditem, objcontrolitem set objcopieditem = item.copy call objcopieditem.move(objpstfolder)  dim property1 : set property1 = getmigrationproperty(objcopieditem.itemproperties)   if property1 nothing      set property1 = objcopieditem.itemproperties.add("migration id", 1)      property1.value = item.entryid      objcopieditem.save  else    property1.value = item.entryid    objcopieditem.save  end if 

the error occurs @ objcopieditem.save, operation works without problems if add properties original item , copy/move , new item, delete property on original item.

move function returns new item, not sub:

set objcopieditem = item.move(objpstfolder) 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -