Outlook Automation: How to differentiate between ansi and unicode PST files?

D

davecla

Anyone know how I can programmatically tell if a PST file is ansi or
unicode based?

I can manually check for either "Personal Folders File (97-2002)" or
"Personal Folders File" in the advanced tab, but how can I do this with
automation.


Thanks and regards,

David

(sorry about the manual xpost in microsoft.public.outlook, I hear this
is a better place to post!)
 
D

davecla

On further investigatation it appears that the answer is held in
PR_STORE_SUPPORT_MASK, if I can retrieve this I can then check for
STORE_ANSI_OK or STORE_UNICODE_OK, so my question now is....

how on earth can I get PR_STORE_SUPPORT_MASK using automation.

Thanks

David
 
D

Dmitry Streblechenko

Youy will need to use Extended MAPI (C+/Delphi only) or CDO 1.21 or
Redemption in case of VB or .Net languages.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
O

originalkilroy

Anyone know how I can programmatically tell if a PST file is ansi or
unicode based?

I can manually check for either "Personal Folders File (97-2002)" or
"Personal Folders File" in the advanced tab, but how can I do this with
automation.


Thanks and regards,

David

(sorry about the manual xpost in microsoft.public.outlook, I hear this
is a better place to post!)

David:

You can find out what your file type is a couple of ways. One quick
and easy way is to open it up in a Notepad editor and then look at the
save as. If it presets to Unicode then you will have a Unicode 16, If
it defaults to UTF-8 then it is Unicode 8 bit. Other than that it
should be ANSI. Which is 7-bit.

If you really want to play withthe file do a Hex dump on the file and
look for spacing and headers. It will be a clear giveaway if it is
Uncode or ANSI.

To Automate this you can run VBA and script the file and then run a
regx on the output for the spacing and the headers.

Hope this helps :)

OriginalKilroy
 

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