Hi all.
I use OL2000 sp3. I have a form to scan the inbox for certain meassage. my questionis how i copy the attachment of these message to local drive (i.e C:\)
What did i do wrong. can some one help or point me to the right path.
Thank you and below is my code.
sub Function Item_Open()
' Open form...
Dim i, temp
Set objSession = Application.CreateObject("MAPI.Session")
objSession.Logon
Set objInbox = objSession.Inbox ' inbox
set objMessages = objThisFolder.Messages ' mail collection
set objCurrMessage = objMessages.Item(1) 'first mail
for each tmpAttachment in objCurrMessage.Attachments
tmpAttachment.SaveAsFile "C:\" & "abc.msg"
next
' SaveasFile error: (object does not support method or
' property Saveasfile.
'
End function
I use OL2000 sp3. I have a form to scan the inbox for certain meassage. my questionis how i copy the attachment of these message to local drive (i.e C:\)
What did i do wrong. can some one help or point me to the right path.
Thank you and below is my code.
sub Function Item_Open()
' Open form...
Dim i, temp
Set objSession = Application.CreateObject("MAPI.Session")
objSession.Logon
Set objInbox = objSession.Inbox ' inbox
set objMessages = objThisFolder.Messages ' mail collection
set objCurrMessage = objMessages.Item(1) 'first mail
for each tmpAttachment in objCurrMessage.Attachments
tmpAttachment.SaveAsFile "C:\" & "abc.msg"
next
' SaveasFile error: (object does not support method or
' property Saveasfile.
'
End function