MacID 函数

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

语法

MacID (常量)

所需的 常量 参数由 4 个字符组成,用于指定资源类型、文件类型、应用程序签名或 Apple 事件;例如,EXCEL 文件的 TEXT、OBIN、“XLS5” ( Excel 97) 的“XLS8”;Microsoft Word 对 Word 97) 使用“W6BN” (“W8BN”等。

备注

MacIDDirKill 一起使用来指定 Macintosh 文件类型。 由于 Macintosh 不支持 * 作为通配符,因此可以改用四个字符常量来标识文件组。 For example, the following statement returns TEXT type files from the current folder:

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

MacIDShellAppActivate 一起使用,以使用应用程序的唯一签名指定应用程序。

另请参阅

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。