Office для Mac Office for Mac
Используйте надстройки и макросы VBA, разработанные для Office для Windows с Office для Mac. Use VBA add-ins and macros that you developed for Office for Windows with Office for Mac.
Применимо к: Excel для Mac | PowerPoint для Mac | Word для Mac | Office 2016 для Mac Applies to: Excel for Mac | PowerPoint for Mac | Word for Mac | Office 2016 for Mac
Если вы разрабатываете макросы для Office для Mac, вы можете использовать большинство объектов, доступных в VBA для Office. If you are authoring Macros for Office for Mac, you can use most of the same objects that are available in VBA for Office. Сведения о VBA для Excel, PowerPoint и Word можно найти в следующих статьях: For information about VBA for Excel, PowerPoint, and Word, see the following:
Outlook для Mac и OneNote для Mac не поддерживают VBA. Outlook for Mac and OneNote for Mac do not support VBA.
Office 2016 для Mac является изолированным Office 2016 for Mac is sandboxed
В отличие от других версий приложений Office, поддерживающих VBA, приложения Office 2016 для Mac изолированы. Unlike other versions of Office apps that support VBA, Office 2016 for Mac apps are sandboxed.
«Песочница» запрещает приложениям получать доступ к ресурсам за пререшениями контейнера приложения. Sandboxing restricts the apps from accessing resources outside the app container. Это влияет на все надстройки или макросы, затрагивающие доступ к файлам или обмен данными между процессами. This affects any add-ins or macros that involve file access or communication across processes. С помощью новых команд, описанных в следующем разделе, можно свести к минимуму влияние изолированной среды. You can minimize the effects of sandboxing by using the new commands described in the following section.
Создание установщика или помещение контента пользователя Creating an installer or putting user content
Инструкции по созданию установщика для надстройки можно найти в статье: Нсталлинг User Content in Office 2016 for Mac For instructions on creating an installer for your add-in, please refer to the article here: nstalling User Content in Office 2016 for Mac
Новые команды VBA для Office 2016 для Mac New VBA commands for Office 2016 for Mac
Следующие команды VBA являются новыми и уникальными для Office 2016 для Mac. The following VBA commands are new and unique to Office 2016 for Mac.
Command Command | Использовать для Use to |
---|---|
GrantAccessToMultipleFiles GrantAccessToMultipleFiles | Запросите разрешение пользователя на доступ к нескольким файлам одновременно. Request a user’s permission to access multiple files at once. |
AppleScriptTask AppleScriptTask | Вызов внешних сценариев AppleScript из VB. Call external AppleScript scripts from VB. |
MAC_OFFICE_VERSION MAC_OFFICE_VERSION | Между различными версиями Office Mac во время компиляции — IFDEF. IFDEF between different Mac Office versions at compile time. |
Настройка ленты в Office для Mac Ribbon customization in Office for Mac
Office 2016 для Mac поддерживает настройку ленты с помощью XML ленты. Office 2016 for Mac supports ribbon customization using Ribbon XML. Обратите внимание на то, что в Office 2016 для Mac и Office для Windows есть некоторые различия в поддержке ленты. Note that there are some differences in ribbon support in Office 2016 for Mac and Office for Windows.
Функция настройки ленты Ribbon customization feature | Office для Windows Office for Windows | Office для Mac Office for Mac |
---|---|---|
Возможность настройки ленты с помощью XML-кода ленты Ability to customize the ribbon using Ribbon XML | Available Available | Available Available |
Поддержка надстроек, основанных на документе Support for document based add-ins | Available Available | Available Available |
Возможность вызывать макросы с помощью пользовательских элементов управления ленты Ability to invoke Macros using custom ribbon controls | Available Available | Available Available |
Настройка пользовательских меню Customization of custom menus | Available Available | Available Available |
Возможность включения и вызова элементов управления Office Fluent на настраиваемой вкладке ленты Ability to include and invoke Office Fluent Controls within a custom ribbon tab | Available Available | Самые привычные идентификаторы элементов управления Office Fluent совместимы с Office для Mac. Most familiar Office Fluent Control Identifiers are compatible with Office for Mac. Некоторые из них могут быть недоступны. Some might not be available. Команды, совместимые с Office 2016 для Mac, можно найти в статье атрибуты idMso Compatible with office 2016 для Mac. For commands that are compatible with Office 2016 for Mac, see idMSOs compatible with Office 2016 for Mac. |
Поддержка надстроек COM, использующих настраиваемые элементы управления ленты Support for COM add-ins that use custom ribbon controls | Available Available | Office 2016 для Mac не поддерживает сторонние надстройки COM. Office 2016 for Mac doesn’t support third-party COM add-ins. |
Атрибуты idMso, совместимый с Office 2016 для Mac idMSOs compatible with Office 2016 for Mac
Сведения о атрибуты idMso, совместимых с Office 2016 для Mac, можно найти в следующих статьях: For information about the idMSOs that are compatible with Office 2016 for Mac, see the following:
См. также 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.
Question: Q: How can I download Visual Basic on Mac
How can I download Visual Basic on Mac
MacBook Air, macOS Sierra (10.12.4)
Posted on Apr 11, 2017 5:08 PM
All replies
Loading page content
Page content loaded
Since it only runs on Widows machines a workaround would be to create a partition on your Mac using Boot Camp so you can install Windows to run Visual Basic.
That’s a lot of work to go through just to use one app.
Apr 11, 2017 5:12 PM
What do you need Visual Basic for?
Maybe if you tell us what you are trying to do we might be able to suggest a different solution.
Apr 11, 2017 5:13 PM
I want to try things on it
because my educational curriculum talks about Visual Basic and programming
Apr 11, 2017 5:17 PM
if I installed Windows the software (macOS Sierra) Will disappear?
Apr 11, 2017 5:20 PM
No. There are two way you can install Windows; either with BootCamp or with visualization software. BootCamp will allow you to reboot into Windows. While virtualization software will allow to execute Windows code while OS X is still running.
Apr 11, 2017 5:41 PM
I am using VBA successfully in Mac Excel 2016.
- Go to Preferences
- Choose Ribbon and Toolbar in the first section (Authoring)
- Make sure Ribbon is selected
- Check the box next to Developer
It works pretty well but there is still some development to do. eg Intellisence is not yet available and debugging could be improved.
Jun 28, 2017 2:43 PM
Question: Q: How can I download Visual Basic on Mac More Less
Office for Mac
Use VBA add-ins and macros that you developed for Office for Windows with Office for Mac.
Applies to: Excel for Mac | PowerPoint for Mac | Word for Mac | Office 2016 for Mac
If you are authoring Macros for Office for Mac, you can use most of the same objects that are available in VBA for Office. For information about VBA for Excel, PowerPoint, and Word, see the following:
Outlook for Mac and OneNote for Mac do not support VBA.
Office 2016 for Mac is sandboxed
Unlike other versions of Office apps that support VBA, Office 2016 for Mac apps are sandboxed.
Sandboxing restricts the apps from accessing resources outside the app container. This affects any add-ins or macros that involve file access or communication across processes. You can minimize the effects of sandboxing by using the new commands described in the following section.
Creating an installer or putting user content
For instructions on creating an installer for your add-in, please refer to the article here: nstalling User Content in Office 2016 for Mac
New VBA commands for Office 2016 for Mac
The following VBA commands are new and unique to Office 2016 for Mac.
Command | Use to |
---|---|
GrantAccessToMultipleFiles | Request a user’s permission to access multiple files at once. |
AppleScriptTask | Call external AppleScript scripts from VB. |
MAC_OFFICE_VERSION | IFDEF between different Mac Office versions at compile time. |
Ribbon customization in Office for Mac
Office 2016 for Mac supports ribbon customization using Ribbon XML. Note that there are some differences in ribbon support in Office 2016 for Mac and Office for Windows.
Ribbon customization feature | Office for Windows | Office for Mac |
---|---|---|
Ability to customize the ribbon using Ribbon XML | Available | Available |
Support for document based add-ins | Available | Available |
Ability to invoke Macros using custom ribbon controls | Available | Available |
Customization of custom menus | Available | Available |
Ability to include and invoke Office Fluent Controls within a custom ribbon tab | Available | Most familiar Office Fluent Control Identifiers are compatible with Office for Mac. Some might not be available. For commands that are compatible with Office 2016 for Mac, see idMSOs compatible with Office 2016 for Mac. |
Support for COM add-ins that use custom ribbon controls | Available | Office 2016 for Mac doesn’t support third-party COM add-ins. |
idMSOs compatible with Office 2016 for Mac
For information about the idMSOs that are compatible with Office 2016 for Mac, see the following:
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.