unread after move

  • Thread starter Thread starter PeterQ
  • Start date Start date
P

PeterQ

Hallo Team !

Thank you for the answer to my last question, Ken.

I have encountered this problem:
after i have done a move, i want to "unread" the moved email message.
but this does not seem to work:

cpyItem is an existing MailItem
cpyRes is a reference to a MailItem
X is an assumed foldername

cpyItem.FlagStatus = olNoFlag
cpyItem.Save

Set cpyRes = cpyItem.Move(m_oMailbox.Folders.Item("X"))
cpyRes.UnRead = False <<<======
cpyRes.Save

why doesn't this work ? In the destinationfolder "X"
I see that the e-mail message still is shown as "unread".

Help me, please.

greetings
Peter
 
Wouldn't you need to set the UnRead property to "True"?

cpyRes.UnRead = True
 
The property is UnRead. To mark an item as read you set that property to
False, to mark it as unread you set it to True. Sometimes you might need to
do it twice, with a .Save after each setting of the property.




Hallo Team !

Thank you for the answer to my last question, Ken.

I have encountered this problem:
after i have done a move, i want to "unread" the moved email message.
but this does not seem to work:

cpyItem is an existing MailItem
cpyRes is a reference to a MailItem
X is an assumed foldername

cpyItem.FlagStatus = olNoFlag
cpyItem.Save

Set cpyRes = cpyItem.Move(m_oMailbox.Folders.Item("X"))
cpyRes.UnRead = False <<<======
cpyRes.Save

why doesn't this work ? In the destinationfolder "X"
I see that the e-mail message still is shown as "unread".

Help me, please.

greetings
Peter
 
Hallo Team,

Thank you for answering my question. I must apologize (it was late for
me and the weekend was ahead) for this error: I meant: to mark as
"read".
But your answers + comment were really helpful to me.

greetings
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top