Moving embedded messages to folders / Unread Flag 
Author Message
 Moving embedded messages to folders / Unread Flag

Hi,

I'm still trying to move/copy embedded messages from a message in my inbox
into any Outlook folder using VBA.
So far I'm using the following code:

Sub test()
  Set myOlApp = CreateObject("Outlook.Application")
  Set myNamespace = myOlApp.GetNamespace("MAPI")
  Set mySrcFolder = myNamespace.GetDefaultFolder(olFolderInbox)
  Set myDstFolder = mySrcFolder.Folders("Test")
  Set myItem = mySrcFolder.Items(1)
  myItem.Attachments(1).SaveAsFile ("C:\temp\test.oft")
  Set myMail = myOlApp.CreateItemFromTemplate("c:\temp\test.oft")
  myMail.Move (myDstFolder)
  myMail.Unread = True
End Sub

But with this I end up with a message with the status 'not sent'. Is there
any way to change the appropriate property, or is their a better way to move
the embedded message??

Another question: Why does a message remains in the status 'read' after I
set the property 'UnRead' to True??

Thanks for any hint
Bernd



Sun, 14 Jul 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Outlook - Reading from diferent folders/ read/unread flag

2. Outlook - Reading from diferent folders/ read/unread flag

3. Detecting unread message(s) in folder and highlighting all folders above

4. Detecting unread message(s) in folder and highlighting all folders above

5. VB to mark all messages in a folder as UNREAD

6. Unread Items in Public Folders like in personal Folders

7. How do I set the read flag on unread mail

8. Change unread-flag

9. MapiMessages control MsgNoteText flags unread to read

10. Moving a message from Inbox to a folder in PST (No Exchange Server)

11. notification when messages or moved into a folder

12. How can I move the message to another folder

 

 
Powered by phpBB® Forum Software