WINMAIL.DAT

P

Peter Wohlken

Scenario: I am using COM objects to automate Outlook 2003 in a
corporate setting. My program creates a new message, adds SMTP
recipient, sets BodyFormat to plain text, adds subject and body,
attaches a spreadsheet, and sends message.

Problem: Non-Outlook recipient receives WINMAIL.DAT instead of Excel
attachment. This also happens when performing the above steps manually
using the Outlook 2003 progran itself.

More info: I don't have this problem at home, where I have Outlook 2003
internet-only-- the attachment is sent as a spreadsheet and not as
WINMAIL.DAT.

Solution I cannot use: The user will not make a global setting to set
all messgages to use plain text.

What I'm considering: I could create a contact and try setting the
message format on a 'per recipient' basis. However, I can't find a COM
object property for the 'Internet Format' setting that appears in
Outlook on the contact properties page.

Anyone have a clue why it's so hard to stop WINMAIL.DAT from being sent?

What about the contact property I mentioned ('Internet Format') - is
there a COM object property for this?
 
E

Eric Legault [MVP - Outlook]

Those winmail.dat attachments only occur when non-Outlook clients receive
Rich Text messages. So this sounds like you have Convert to Rich Text turned
on for the recipient by the setting for their e-mail address in their Contact
item.

How e-mail message formats affect Internet e-mails in Outlook:
http://support.microsoft.com/default.aspx?scid=kb;en-us;290809

This can also be controlled in an Exchange environment; maybe Rich Text is
forced here:

How to configure Internet e-mail message formats at the user and the domain
levels in Exchange Server 2003:
http://support.microsoft.com/default.aspx?scid=kb;en-us;821750

If you want to control per-recipient Internet format options with code, you
need to use CDO. The options are controlled by the following properties in
the Recipient.AddressEntry.Fields collection:

Rich Text On:
PR_SEND_INTERNET_ENCODING = 0 (PT_LONG)
PR_SEND_RICH_INFO = true (PT_BOOLEAN)

Plain Text On:
PR_SEND_INTERNET_ENCODING = 393216 (PT_LONG_
PR_SEND_RICH_INFO = false (PT_BOOLEAN)

There's a good example here, and it even modifies the same property:

PRB: Changing Properties of AddressEntry object of a Recipient:
http://support.microsoft.com/default.aspx?scid=kb;en-us;171671
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top