I have tho following problem.
I want to write a makro that moves an attached mail to the inbox.
It works so far. But the mail then is in the layout modus, like I wanted to sent it. I want in in the read mode like an email that arrived.
I wrote the following( with help of an existing acript):
Public Sub RemoveAttachments(item As MailItem)
Dim ns As NameSpace
Dim Inbox As MAPIFolder
Dim Atmt As Attachment
Dim FileName As String
Dim itemnew As Object
Dim foundemail As Boolean
foundemail = False
Set ns = GetNamespace("MAPI")
Set Inbox = ns.GetDefaultFolder(olFolderInbox)
For Each Atmt In item.Attachments
If Right(Atmt.FileName, 3) = "msg" Then
foundemail = True
FileName = "c:\temp\"