Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO.Message AddAttachment noname

Status
Not open for further replies.

sdagger2

Programmer
May 5, 2008
39
GB
Hi

I am using the CDo.Message object to send out emails with attachements. This works great. My problem is when I receive the email (google mail inbox), the attachments shows it is a word document (uploaded on the server as newsletter.doc) but the name of the document shows "noname".

I would like to see the email attachment with its proper name if possible (not noname). The attachments is there and is the correct document. I have used the standard code of:

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "me@my.com"
objMessage.To = "test@someone.com"
objMessage.TextBody = "This is some sample message text."
objMessage.AddAttachment "c:\temp\newsletter.doc"
objMessage.Send

It all works fine apart from the attachment having "noname" on the receiving end.

Could anybody point out if I have missed a parameter or doing something wrong?

Many thanks to anyone who can offer help

Best regards

Sean.
 
This is strange because although the attachment is showing and working in googlemail (although with noname) but I have just tried it using my hotmail and no attachment is showing at all.

I'm stumped.

Anybody help?

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top