Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / September 2003

Tip: Looking for answers? Try searching our database.

Adding attachments through code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pete Glynn - 30 Sep 2003 22:04 GMT
I would like to attach one or more files (mainly Word documents, pdf and tif
files) to messages through code. The Add method of the Attachments object
works fine provided recipients are using Outlook as their email client but
recipients using Pegasus, Eudora etc (i.e. most of them) only ever see a
single Winmail.dat file attachment which they cannot read. There is no
problem for these users when attachments are added through the Outlook user
interface. I have tried using the Add method of the CDO Attachments
collection but have not had any success with this either so far.

I know this is part of a wider problem involving rich text and TNEF but is
it at all possible to add file attachments through code without causing this
problem and if so what am I missing?  I'd really appreciate any information
on this because I've been banging my head against this particular brick wall
for some time now and it's getting seriously uncomfortable. (I'm using
Outlook 2000 in IMO mode and CDO 1.21).

Thanks,
Pete
Sue Mosher - 30 Sep 2003 23:18 GMT
A code snippet would be helpful. How are you setting the
address on the message? Also, why CDO and not Outlook?
Unless you're setting the Body property or using a custom
form, just adding an attachment with Outlook objects
shouldn't create a Winmail.dat RTF attachment.  
Signature

Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
    Microsoft Outlook Programming: Jumpstart
    for Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx 

>-----Original Message-----
>I would like to attach one or more files (mainly Word documents, pdf and tif
[quoted text clipped - 12 lines]
>for some time now and it's getting seriously uncomfortable. (I'm using
>Outlook 2000 in IMO mode and CDO 1.21).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.