Codestone Ltd logo

Search FAQ

Internet Mail Client Control FAQs/Errors

I'm getting runtime error 80040212H (errInvalidDisposition) what's wrong?

ID: S12E36 DATE: 27/01/2003 10:18:07

Error 80040212H (errInvalidDisposition) is most often caused by attempting to set the .Filename property to an invalid MIME value. A filename may be valid on a particular file system but not as a MIME filename parameter. Filenames containing SPACE characters are a common example.

The problem is easilly resolved by presenting the filename as a quoted string.

    msg.Sections(1).Filename="test.xls"        'OK - 
msg.Sections(1).Filename="test 1.xls"      'Error 80040212
msg.Sections(1).Filename="""test 1.xls"""  'OK

There may also be issues if there are international characters in the filename. International characters in the filename are not strictly supported by the MIME standard - see FAQ S13E30 for more information.

Error 80040212H can, more obviously, also be caused by attempting to set the value of the .Disposition property to a value other than inline or attachment.

Related questions

Can't find the answer to your question? We're here to help!