> Hi All
>
[quoted text clipped - 6 lines]
> There doesn't appear to be a similar function with CDO so I was wandering if
> anyone had found a function or a way of doing it.
Its a bit messy in CDOSYS you need to rewrite the Content-Disposition header
yourself:-
Const cdoContentDisposition = "urn:schemas:mailheader:content-disposition"
. . .
Function AttachFile(roMsg, rsFilePath, rsNewName)
roMsg.AddAttachment rsFilePath
With roMsg.Attachments(1).Fields
.Item(cdoContentDisposition) = "attachment;filename=" & rsNewName
.Update
End With
End Function
AttachFile(oMsg, "c:\somefolder\somefile.dat", "pinkelephants.dat")

Signature
Anthony Jones - MVP ASP/ASP.NET
Yosi - 02 Aug 2008 23:12 GMT
It works !
Thanks.
>> Hi All
>>
[quoted text clipped - 30 lines]
>
> AttachFile(oMsg, "c:\somefolder\somefile.dat", "pinkelephants.dat")