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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with attachment names when using CDO

Status
Not open for further replies.

BobTheMad

Programmer
Jun 11, 1999
81
US
I am writing a program that utilizes CDO to send e-mails with attachments. All is well except for when the e-mail is delivered, and the user double-clicks it to view/save, Outlook returns what appears to be the filename it uses in the \windows\temp\ directory. (Example: attC1D4.TMP). <br><br>When simply viewing the e-mail without opening the attachment, the attachment names are what they are supposed to be. (Example: address.txt)<br><br>I have included the section of CDO code I am using to send these e-mails<br><br>Thanx for the help<br><br>----------------------------------------------<br>With objMessage<br>&nbsp;&nbsp;&nbsp;&nbsp;.Subject = tSubject<br>&nbsp;&nbsp;&nbsp;&nbsp;.Text = tBody<br>&nbsp;&nbsp;&nbsp;&nbsp;Set objAttach = .Attachments.Add<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;With objAttach&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Type = CdoFileData<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Position = -1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Name = &quot;c:\address.txt&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.ReadFromFile &quot;c:\address.txt&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Name = &quot;address.txt&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objMessage.Update<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End With&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>End With<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top