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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -