A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Xheader & WinMail.dat



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 15th 07, 02:31 PM posted to microsoft.public.outlook.program_vba
shubhangi
external usenet poster
 
Posts: 28
Default Xheader & WinMail.dat

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


Ads
  #2  
Old November 15th 07, 03:48 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Xheader & WinMail.dat

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


  #3  
Old November 21st 07, 10:04 AM posted to microsoft.public.outlook.program_vba
shubhangi
external usenet poster
 
Posts: 28
Default Xheader & WinMail.dat

Thanks ,it worked
"Ken Slovak - [MVP - Outlook]" wrote in message
...
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




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Xheader to Received Message shubhangi Outlook and VBA 3 November 14th 07 07:49 PM
update xheader shubhangi Add-ins for Outlook 1 October 18th 07 07:48 PM
update xheader of received message sd[_2_] Outlook and VBA 5 October 18th 07 06:58 PM
winmail.dat Nicolas Macarez Outlook - General Queries 4 September 7th 06 08:52 AM
winmail.dat Boe Outlook - General Queries 5 February 7th 06 02:40 AM


All times are GMT +1. The time now is 07:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.