Resolving MSG file names

  • Thread starter Thread starter GP
  • Start date Start date
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.
 
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.
 
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.
 
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.
 
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.
 
Back
Top