Microsoft KB Archive/62063

= Mac Hyp: Reading an Enclosed File from a Message =

Article ID: 62063

Article Last Modified on 10/30/2006

-

APPLIES TO


 * Microsoft Mail Software Development Kit (SDK) for HyperCard 2.0
 * Microsoft Mail Software Development Kit 3.0

-



This article was previously published under Q62063



SUMMARY
The following syntax reads the enclosed file contained in the specified message from the Mail server: msmail(getEnclosure, messageRef [,fileName] [,replace] [,index]) => fileName



MORE INFORMATION
The file is saved under the name &quot;fileName&quot;. &quot;fileName&quot; can be a complete path or a partial path as explained under addEnclosure. If no name is provided, the standard Macintosh Save File dialog box is displayed, allowing the user to specify a name.

&quot;messageRef&quot; is a reference to a selected message obtained by making a call to the msmail function using a parameter that returns a message reference.

If the &quot;replace&quot; flag is true and a file with the name &quot;fileName&quot; already exists on your system, it will be overwritten. If &quot;replace&quot; is false, then &quot;#n&quot; (where &quot;n&quot; is a number) will be appended to the filename before it is saved so that the existing file is not overwritten. The &quot;replace&quot; flag is ignored if &quot;fileName&quot; is not specified.

The optional &quot;index&quot; parameter allows multiple enclosures to be extracted from a message. Since this feature was not implemented in Microsoft Mail 2.00, passing anything other than 0 (zero) in Mail 2.00 returns an error (0 is the default).

Note: The &quot;index&quot; parameter changed in Mail 3.00. The &quot;index&quot; parameter can be from 1 to the number of enclosed files. Updated scripts that were used with Mail 2.00 should be modified if they used the optional 0 index. Otherwise, a &quot;Bad Index error&quot; will be returned in MailResultText. The default in Mail 3.00 is 1.

In all cases, the name (not path) that the file was successfully saved with is returned.

This information is taken from the &quot;Microsoft Mail HyperCard Interface Documentation.&quot;

Keywords: KB62063

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.