Strange - if you used olMsg, it *shouldn't* save it in Unicode format. Even
if you don't specify the Type argument for the SaveAs method, olMsg is the
default.
However, apparently the default format in 2003 is Unicode. You may need to
turn this off, and then try your code again. Steps are in this article:
You receive a "Cannot Start Microsoft Outlook" message, and you cannot open
a saved message (.msg) file in Outlook 2003:
http://support.microsoft.com/default.aspx?scid=kb;en-us;824122

Signature
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--
Try Picture Attachments Wizard for Outlook!
http://tinyurl.com/9bby8
--
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/
> When I save a mailitem with mailitem.SaveAs(filename, olMsg) to a msg file,
> I can't open the msg-file with outlook XP or 2000. Issume this is because it
[quoted text clipped - 10 lines]
>
> Who can help?
Philippe Requilé - 31 May 2005 07:43 GMT
Yes this must be a bug. It should be possible to save a msg in the previous
format.
Is it possible to uncheck the checkbox "Use Unicode Message Format when
saving messages " with vb-code with ole automation? Otherwise I have to
uncheck this checkbox on every computer manually.
> Strange - if you used olMsg, it *shouldn't* save it in Unicode format.
> Even
[quoted text clipped - 9 lines]
> a saved message (.msg) file in Outlook 2003:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;824122
Philippe Requilé - 31 May 2005 09:51 GMT
> Is it possible to uncheck the checkbox "Use Unicode Message Format when
> saving messages " with vb-code with ole automation?
If found out how to change the checkbox automatically.
it is a registry setting:
[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\General]
"MSGFormat"=dword:00000000
MSGFormat = 1 -> unicode
MSGFormat = 0 -> non-unicode
Eric Legault [MVP - Outlook] - 31 May 2005 15:12 GMT
You can also control this with Group Policies:
Managing Outlook Settings for Office 2003 SP1:
http://www.windowsitpro.com/Article/ArticleID/45017/45017.html

Signature
Try Picture Attachments Wizard for Outlook!
http://tinyurl.com/9bby8
--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/
> > Is it possible to uncheck the checkbox "Use Unicode Message Format when
> > saving messages " with vb-code with ole automation?
[quoted text clipped - 6 lines]
> MSGFormat = 1 -> unicode
> MSGFormat = 0 -> non-unicode
Dmitry Streblechenko - 31 May 2005 18:11 GMT
Of course it is possible:
MailItem.SaveAs(..., olMsg) - saves in the ANSI format
MailItem.SaveAs(..., olMSGUnicode) - saves in the Unicode format
MailItem.SaveAs(...) - saves in the whatever the default MSG format is.
olMsg = 3, olMSGUnicode = 9.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
> Yes this must be a bug. It should be possible to save a msg in the
> previous format.
[quoted text clipped - 16 lines]
>> a saved message (.msg) file in Outlook 2003:
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;824122
Philippe Requilé - 01 Jun 2005 09:05 GMT
> Of course it is possible:
>
> MailItem.SaveAs(..., olMsg) - saves in the ANSI format
> MailItem.SaveAs(..., olMSGUnicode) - saves in the Unicode format
> MailItem.SaveAs(...) - saves in the whatever the default MSG format is.
> olMsg = 3, olMSGUnicode = 9.
That's how it should work, but it doesn't work like that in Delphi7 +
TOutlookApplication (outlook2000.pas) component.
With MailItem.SaveAs(..., olMsg) we get a Unicode format too.
But perhaps it is a problem of the Toutlookapplication component; perhaps it
removes the 2nd parameter when the value =3?
Dmitry Streblechenko - 01 Jun 2005 21:26 GMT
I very much doubt that Delphi wrappers are that smart.
I cannot reproduce this problem. If you have OutlookSpy installed, can you
run the following script in OutlookSpy (select a message, click the Item
button, go to the Script tab, paste the script, click Run). Are the sizes
different?
mailitem.saveas "c:\temp\ansi.msg", 3
mailitem.saveas "c:\temp\unicode.msg", 9
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
>> Of course it is possible:
>>
[quoted text clipped - 7 lines]
> But perhaps it is a problem of the Toutlookapplication component; perhaps
> it removes the 2nd parameter when the value =3?