I get the code below from this Forum, it works like a charm thanx to Paul 
I need to save a message in an selected folder
In Outlook.Application you can do something like
.saveAs "C:\mail.msg",olMsg, but how its working in CDO?
Any help appreciated!
Gerard
Public Sub SelectOutlookItem()
Dim objSession As MAPI.Session
Dim objFolder As MAPI.Folder
Dim objMsgs As MAPI.Messages
Dim objMsg As MAPI.Message
Dim strProfile As String
'Write a function to get the default profile from the registry
'strProfile = fGetDefaultProfile
Set objSession = CreateObject("MAPI.Session")
With objSession
strProfile = "Server" & vbLf & "Clientname"
.Logon , , , False, , True, strProfile
'.Logon ShowDialog:=False, NewSession:=False
'General way to get any default folder
Set objFolder = .GetDefaultFolder(CdoDefaultFolderInbox)
'Inbox is also exposed directly as a property
'Set objFolder = .Inbox
End With
'Get the messages collection in the Inbox
Set objMsgs = objFolder.Messages
'Move through the messages collection
Set objMsg = objMsgs.GetLast
If objMsg Is Nothing Then
'Folder is empty
GoTo ExitSub
Else
' Do While Not objMsg Is Nothing
With objMsg
Debug.Print "Subject: " & .Subject
Debug.Print "Body: " & .Text
Debug.Print "Sent by: " & .Sender
Debug.Print "Received: " & CStr(.TimeReceived)
'Mark it as read
.Unread = False
.Saveas "H:\mail.msg", olMSg
End With
' Set objMsg = objMsgs.GetPrevious
' Loop
End If
GoTo ExitSub
ExitSub:
Set objMsg = Nothing
Set objMsgs = Nothing
Set objFolder = Nothing
Set objSession = Nothing
End Sub

I need to save a message in an selected folder
In Outlook.Application you can do something like
.saveAs "C:\mail.msg",olMsg, but how its working in CDO?
Any help appreciated!
Gerard
Public Sub SelectOutlookItem()
Dim objSession As MAPI.Session
Dim objFolder As MAPI.Folder
Dim objMsgs As MAPI.Messages
Dim objMsg As MAPI.Message
Dim strProfile As String
'Write a function to get the default profile from the registry
'strProfile = fGetDefaultProfile
Set objSession = CreateObject("MAPI.Session")
With objSession
strProfile = "Server" & vbLf & "Clientname"
.Logon , , , False, , True, strProfile
'.Logon ShowDialog:=False, NewSession:=False
'General way to get any default folder
Set objFolder = .GetDefaultFolder(CdoDefaultFolderInbox)
'Inbox is also exposed directly as a property
'Set objFolder = .Inbox
End With
'Get the messages collection in the Inbox
Set objMsgs = objFolder.Messages
'Move through the messages collection
Set objMsg = objMsgs.GetLast
If objMsg Is Nothing Then
'Folder is empty
GoTo ExitSub
Else
' Do While Not objMsg Is Nothing
With objMsg
Debug.Print "Subject: " & .Subject
Debug.Print "Body: " & .Text
Debug.Print "Sent by: " & .Sender
Debug.Print "Received: " & CStr(.TimeReceived)
'Mark it as read
.Unread = False
.Saveas "H:\mail.msg", olMSg
End With
' Set objMsg = objMsgs.GetPrevious
' Loop
End If
GoTo ExitSub
ExitSub:
Set objMsg = Nothing
Set objMsgs = Nothing
Set objFolder = Nothing
Set objSession = Nothing
End Sub