שמירת ATTACHMENT

IshayPer

New member
שמירת ATTACHMENT

אני רוצה לרוץ על ה-INBOX שלי ב-OUTLOOK ולשמור את ה-ATTACHMENTS שאני מחפש . איך אני עושה את זה(לא על ידי MAPI אלא אובייקט של OUTLOOK) ניסיתי לעשות את זה כך: Dim myOlApp As New Outlook.Application Dim myItem As MailItem Dim myAttachments As Attachments Set myItem = myOlApp.ActiveInspector.CurrentItem פה הוא נותן לי הודעת שגיאה OBJECT VAIABLE OR WITH BLOCK VARIABLE NOT SET וזה שאר הקוד ´Set myItem = myOlApp.CreateItem(olMailItem) Set myAttachments = myItem.Attachments myAttachments.Item(5).SaveAsFile "C:\My Documents\" & _ myAttachments.Item(5).DisplayName למה הודעת השגיאה ומה לא הוגדר או אותחל?
 
למעלה