Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to get around macOS forcing Word to need permission to access each file? #1

Open
inspiredearth opened this issue Sep 4, 2023 · 3 comments

Comments

@inspiredearth
Copy link

First off, thanks very much for this script. It just saved me a lot of time.

I used it in macOS 13.4.1.

The one issue I encountered it that each file required Word to open and then a dialogue would pop up in Word saying it needs permission to access the file. I would then have to select the file in Word, and the conversion would succeed. Word would then close. This repeated for every file.

Screenshot 2023-09-04 at 8 36 08 PM

Do you know of any way around this?

One thing I tried was to grant Microsoft Word Full Disk Access but that didn't help.

@MustafaaYilmas
Copy link

Hi,

I solved it like this, Apple System settings -> Privacy and Security -> Full Disk Access -> I added Microsoft Word here.

image

@MustafaaYilmas
Copy link

I have also done the following operations and maybe it was solved because of them.

  1. Apple System settings -> Privacy and Security -> Developer Tools -> Activate Terminal.
image
  1. Microsoft Word -> Preferences -> Security -> Enable All Macros
image

@antarr
Copy link

antarr commented Oct 7, 2024

I've tried both solutions and neither is working. I've also given the library disk access

#!/bin/bash

# Function to recursively iterate over files
process_files() {
  for file in "$1"/*; do
    if [ -d "$file" ]; then
      process_files "$file"
    elif [ -f "$file" ] && [[ "$file" == *.doc ]]; then
      doc2docx --keep-active "$file"
    fi
  done
}

# Check if directory is provided as an argument
if [ -z "$1" ]; then
  echo "Usage: $0 <directory>"
  exit 1
fi

# Start processing files from the given directory
process_files "$1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants