Hi, VBScript online help says the following: If you use VBScript, you do not create the Application object. This example shows how to perform the same task using VBScript. Set myItem = Application.ActiveInspector.CurrentItem Set myAttachments = myItem.Attachments myAttachments.Item(1).SaveAsFile "C:\My Documents\" & _ myAttachments.Item(1).DisplayName
I am using the above given code ( ex from VBScript online help) in a folder agent script in Outlook to save a log file (comes as an attachment of an email ). I am getting the following error: 12/02/01 20:49:56 Run time error at line 20. Source: Microsoft VBScript runtime error Error: 800a01f4. Description: Variable is undefined: 'Application'. Any idea what is the mistake that I am doing here? The equivalent VBA code given in the online help perfectly works fine. thanks, -Masthan. This message is confidential and may also be legally privileged. If you are not the intended recipient, please notify us immediately. You should not copy it or use it for any purpose, nor disclose it's contents to any other person. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of Wilco International. _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Archives: http://www.swynk.com/sitesearch/search.asp To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED]