Rafael:
I know I already answered this for you, but in case anybody else is having the same issue, here is what I sent to Rafael:


When you set something to an object, or part of an object
as MyItem is set, you do not have to define the variables.
The set keyword does this for you. In VBscript, you can
define the variables if you wish by using the keyword Dim
however in VBS everything is a varient anyway so there's
not much of a point and in my opinion it just takes up
space. But if you were going to declare your variables,
you would do it as follows:

Code:
Dim out
Dim myItem

Set out = createobject("outlook.application") 
Set myItem = out.ActiveInspector.CurrentItem 
myItem.attachments.item(1).saveasfile "c:\whatever.txt"