I used this code to save attachments inserted in an e-mail.

Dim out As Outlook.Application
Dim myItem As MailItem
Set out = CreateObject("outlook.application")
Set myItem = out.ActiveInspector.CurrentItem
myItem.attachments.Item(1).SaveAsFile PathAttachments

Then Message error is :
Object variable or with block variable not set!!!

What is happened????

Please help me!!!!!