MacID 函数MacID function

Used on the Macintosh to convert a 4-character constant to a value that may be used by Dir, Kill, Shell, and AppActivate.Used on the Macintosh to convert a 4-character constant to a value that may be used by Dir, Kill, Shell, and AppActivate.

语法Syntax

MacID(常量)MacID(constant)

必需的_常量_参数由4个字符组成, 这些字符用于指定资源类型、文件类型、应用程序签名或 Apple 事件;例如, TEXT、OBIN、"XLS5" for Excel 文件 ("XLS8", 适用于 Excel 97);Microsoft Word 使用 "W6BN" ("W8BN" 的 Word 97), 依此类推。The required constant argument consists of 4 characters used to specify a resource type, file type, application signature, or Apple Event; for example, TEXT, OBIN, "XLS5" for Excel files ("XLS8" for Excel 97); Microsoft Word uses "W6BN" ("W8BN" for Word 97), and so on.

备注Remarks

MacIDDirKill 一起使用来指定 Macintosh 文件类型。MacID is used with Dir and Kill to specify a Macintosh file type. 由于 Macintosh 不支持***** 和吗?Because the Macintosh does not support * and ? as wildcards, you can use a four-character constant instead to identify groups of files.as wildcards, you can use a four-character constant instead to identify groups of files. For example, the following statement returns TEXT type files from the current folder:For example, the following statement returns TEXT type files from the current folder:

Dir("SomePath", MacID("TEXT"))

MacIDShellAppActivate结合使用, 以使用应用程序的唯一签名指定应用程序。MacID is used with Shell and AppActivate to specify an application by using the application's unique signature.

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.