Microsoft Word Need To Grant File Access Mac

Problems with Apple’s sandbox requirements and Mac Office 2016 with VBA code

If you're trying to open a Word doc, and it keeps saying you don't have permission (even when you own the document), asking you to grant access to the document, and then still not giving you access; then just quit out of Word completely, and then launch it up again. The document should open fine after that. Jan 30, 2020 Microsoft Word is a word processing application that was first released on the Mac in 1985. The word processor differentiates itself from text editors such as Notes by providing a robust platform with advanced features including spell checking, embedded objects and charts, pictures. Jul 30, 2018 Fix: Word Cannot Open the Document: User Does Not Have Access Privileges. If the issue is with your Computer or a Laptop you should try using Reimage Plus which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. Office 365 customers get the new Office for Mac first. You’ll have Office applications on your Mac or PC, apps on tablets and smartphones for when you're on the go, and Office Online on the web for everywhere in between. For example, you can change permission settings for a folder so that other users who log in to your Mac, or connect to it for file sharing, can view but not change files in a folder. Assign permissions to users and groups. No Access: Blocks all access to the item.

When referring to Microsoft trademarks and the names of Microsoft software, products, and services, follow these Microsoft Trademark and Brand Guidelines. Microsoft Trademark & Brand Guidelines. You may use Microsoft trademarks in text solely to refer to and/or link to Microsoft’s products and services and in accordance with the terms of these Guidelines.

In Windows Excel 97-2016 and in Mac Excel 2011 you can open files or save files where you want in almost every folder on your system without warnings or requests for permission. But in Mac Office 2016 Microsoft have to deal with Apple’s sandbox requirements. When you use VBA in Mac Excel 2016 that Save or Open files you will notice that it is possible that it will ask you permission to access the file or folder (Grant File Access Prompt), this is because of Apple’s sandbox requirements.This means that when you want to save/open files or check if it exists with VBA code the first time you will be prompted to allow access on the first attempt to access such a folder or file.

How to avoid problems

There are a few places on your Mac that you can use to avoid the prompts and let your code do what it needs to do without user interaction. But these folders are not in a place that a user can easily find so below are some steps that I hope to make it easier for you to access the folder manual if you want.

This is the Root folder on my machine that we use in the examples on this page:
/Users/rondebruin/Library/Group Containers/UBF8T346G9.Office
Note: rondebruin is the user name in this path and I agree that the naming of the folder for Office(UBF8T346G9.Office) is not so nice, but Microsoft must use that of Apple.

The folder above you can use to share data between Office programs or with a third party application, so this location will always work if you want to have read and write access. If you want to have a location only for Excel for example use this path : /Users/rondebruin/Library/Containers/com.microsoft.Excel/Data
NeedI not use this location on this example page to be sure that every Office program can access my files if this is needed.

Manual create a folder for your Excel files in the Office folder

  1. Open a Finder Window
  2. Hold the Alt key when you press on Go in the Finder menu bar
  3. Click on Library
  4. Open the Group Containers folder
  5. Open the UBF8T346G9.Office folder
  6. Create a Folder inside this folder named MyExcelFolder for example
  7. Select this folder

This are three ways to easily open the folder manual :

  • Add it to your Favorites in Finder by dragging it to it.
  • Add it to your Favorites in Finder with the shortcut : cmd Ctrl T
  • Drag the folder to the Desktop with the CMD and Alt key down. You now have a link(alias) to the folder on your desktop so it is easy to find it and open it in the future.

Note : Adding the folder to your Favorites is my favorite because you see the folder in your open and save dialogs in Excel.

How to create a Folder in the Office folder with VBA code

Below you find a macro and a function that you can use to create a folder if it not exists in the Root folder named : UBF8T346G9.Office

In the macro you see one line that call the function and the argument is the name of the folder that you want to create if it not exists. Change 'MyProject' to something else to create another folder.

Note: On this page there is a example to create a shortcut on the Desktop to the folder.

How do I open files with VBA code in my folder ?

Below you find a macro and a function that you can use to open a file in one of the sub folders of the UBF8T346G9.Office folder. In the macro you see one line that call the function and there are two arguments :

  1. Name of the sub folder
  2. Name of the file

Note : You can also add code in the macro to test if the file is already open, I use that also in the code example in this section : Browse to a file or files in a sub folder of the Office folder.

How do I Save a file with VBA code in my folder ?

The first macro create a file of only the activesheet and save it in a folder named: ProjectName and the second macro save a copy of the file in a folder named Backup. Both are sub folders of your UBF8T346G9.Office folder. Be sure you update your Mac Office 2016 install so it is 16.9 or higher.

Note : Both macros use the custum function CreateFolderinMacOffice2016 that you find in the first section of this page.

Browse to a file or files in a sub folder of the Office folder

In the example below it opens a browse dialog with a folder folder named : MyExcelFolder from your UBF8T346G9.Office folderand you are only able to select xlsx files. Below the macro you find a list of format names and you can read how you can change it. Note: Do not forget to copy the bIsBookOpen function in your module, you find it below the macro.

Other file formats :

In the macro you see this code line that say which file format you can select (xlsx).

FileFormat = '{'org.openxmlformats.spreadsheetml.sheet'}'

If you want more then one format you can use this to be able to also select xls files.

FileFormat = '{'org.openxmlformats.spreadsheetml.sheet','com.microsoft.Excel.xls'}'

This is a list of a few formats that you can use :

xls : com.microsoft.Excel.xls

xlsx : org.openxmlformats.spreadsheetml.sheet

xlsm : org.openxmlformats.spreadsheetml.sheet.macroenabled

xlsb : com.microsoft.Excel.sheet.binary.macroenabled

csv : public.comma-separated-values-text

doc : com.microsoft.word.doc

docx : org.openxmlformats.wordprocessingml.document

docm : org.openxmlformats.wordprocessingml.document.macroenabled

ppt : com.microsoft.powerpoint.ppt

pptx : org.openxmlformats.presentationml.presentation

pptm : org.openxmlformats.presentationml.presentation.macroenabled

txt : public.plain-text

More information

See this page for more information about selecting files in Excel 2011 and Excel 2016

See this page for more information about the file format numbers

FileFormat numbers in Mac Excel


One of the highly used inbuilt applications of Microsoft Windows based systems is Microsoft Office. Microsoft Office is a bundle of programs that includes the text editor, spreadsheet, PowerPoint presentation, and more such. Out of these applications, the text editor of MS Office suite i.e. MS Word is most popular one. Most of the Windows users use this application of Office suite extensively for writing their personal stuff, penning down their official write ups, or doing their school assignments. That means MS Word is used by people of all cadres.
Due to its usability and popularity, we cannot say that MS Word is a robust application instead of many times your MS Word doc too gets corrupt and thus causes data loss stored in them. Generally, a corrupt Word document does not open. Mentioned below are two most common error messages that you may encounter when your MS Word document does not open:

“Word cannot open the document: user does not have access privileges.”

Or

“Word cannot open the document.”

However, this behaviour can also be exhibited by MS Word when you are trying to open it in an older version. If this is not the case, then before troubleshooting, it is suggested to understand the exact factors that are causing such unexpected behaviour. Therefore, first of all, you should check your document in question for this behaviour through the below-mentioned steps:

  • Check out whether the similar resolution as mentioned above seen in other Word documents. If the problem within this document only, then:
  • Take this document to another computer and try to open this file there. If your Word file is duplicating the behaviour there as well, then your doc file is corrupt.

Microsoft Word Need To Grant File Access Mac Free

Follow the below steps to rectify your problem and repair your Word file in such case:

  • Open your Word document in Draft mode: At times, opening the damaged Word document in the proposed mode without updating the links can open it.
  • Open a new Word document and try to insert the damaged document as a file in it: Open a new Word document and try to insert your damaged document as a file in this new doc. This, many times, solves your problem.
  • Force MS Word to recover your corrupt file: In most of MS Word corruption errors, you will be able to open your corrupt Word file by following the above two methods, but even after that, you may find some ambiguities in it. Ambiguities like unreadable texts on your Word doc or other such behaviours are seen. In such situations, you can try ‘Open and Repair’ utility of your MS Word to force it to repair the corruption in the selected Word file and then open it.
  • Try Stellar Repair for Word software: However, if none of those mentioned above resolutions works to rectify your issue, then use of Stellar Repair for Word software to fix the MS Word document issue. It repairs corrupted .docx and .doc files created in MS Word 2013 to 2000 and supports Windows 10, 8, 7, Vista, 2003, XP, 2000, & NT.

Excel File Grant Access Mac

With the help of the above-mentioned resolution steps, you for sure will rectify Word document corruption and get back your precious data stored in them.