Winmail.dat is sent when you are sending Rich Text (RTF) messages, it's used
to encapsulate the RTF envelope. Are you sending in Rich Text format? You
can set BodyFormat to either plain text or HTML and see if that helps:
item.BodyFormat = Outlook.OlBodyFormat.olFormatPlain; // or olFormatHTML
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"shubhangi" wrote in message
...
Hello
I've added xheader to outgoing message.When the message contains
Attachment,it is sent as
winmail.dat.I tried to set UseTNEF to false but still attachement is not
being sent properly
code is
Private Sub AvoidWinmailAttachment(ByVal MailItem As Outlook.MailItem)
Dim sItem As Object
Dim Tag
sItem = CreateObject("Redemption.SafeMailItem")
sItem.Item = MailItem
Tag = sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}",
"UseTNEF")
'{00062008-0000-0000-C000-000000000046}, 0x8582, PT_BOOLEAN
Tag = Tag Or &HB
sItem.Fields(Tag) = False
sItem.Subject = sItem.Subject 'to trick Outlook into thinking that
something has changed
sItem.Save()
End Sub
AvoidWinmailAttachment is called in Application_ItemSend event after
AddXheader.
Code is run without any errors.
What else I need to do?
Thanks