Resolving MSG file names

G

GP

When I drag and drop a group of Outlook messages to a Windows file system
folder, the file names are resloved (illegal characters removed) and
duplicate file names are catered for (using (1), (2)...). How do I access and
use the function(s) that take care of these aspects? When using
MailItem.Subject as the filename with the MailItem.SaveAs method, the file
name is not resolved and truncates at the point an illeagal charater in
..Subject is encountered.

Ta.
 
G

GP

Ken,

Writing a procedure to remove the illeagal string characters is not a
problem. I have already written a function to do that. However the .SaveAs
method sometimes throws an error for unexpected reasons (I have seen it
happen when there is a tab in .Subject). Are the built in functions that
already deal with this, and the handling of two messages witht the same
filename, not accessible?

Thanks.
 
K

Ken Slovak - [MVP - Outlook]

Obviously if you're getting errors in those circumstances the internal code
that checks those things is not being called and it's up to you to take care
of handling those conditions.
 
G

GP

Ken,

I'm just trying to avoid re-inventing the wheel. If Microsoft have already
written the existing functions to cope with file naming errors that I have
thought of, and also errors I have not thought of, then using those functions
would be a great help. For example I had one .SaveAs file name error that I
never found the cause of, even after pasting .Subject into Word and looking
for non-visible / non-standard characters. Are the built in functions
available, and if so how can I access them?

Thanks.
 
K

Ken Slovak - [MVP - Outlook]

Those functions are not accessible from Outlook. They may be available as
Win32 API calls possibly, or from some Framework calls if you're using
managed code, otherwise you have to roll your own.
 

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