Problem to Open dotm with Macro

Rodrigo José Petreça 1 Reputation point
2022-09-05T16:16:39.66+00:00

Hello,

We have an internal system that automatically generates commercial proposals. As a template file, we use a dotm with macros.
These files are stored in the program folder on C:
But when the proposal is generated, the program creates a temporary file in:

C:\Users\MYUSER\AppData\Local\Microsoft\Windows\INetCache\Content.Word

On some machines Content.Word doesn't even exist, we already tried to create it, but it didn't solve the problem.

We have already marked the dotm files as trusted, but the problem persists.

We already enabled the macros in Word, but it didn't work.
We've already marked several directories as trusted, but that didn't fix it either.

Any tips on how to solve this problem?

I am testing with Office 365, version 2207

237908-macros-problem.jpeg

Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
891 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Charles Qi_MSFT 966 Reputation points
    2022-09-06T08:14:41.55+00:00

    Hi, @Rodrigo José Petreça

    You can have a try of the following methods:

    1. Open developer->Macro Security, the in Trust Center click Macro Settings and tick "Trust access to the VBA project object model"
      238094-setting.png

    Also please have a check to see if the location is added as a trusted location in Word.
    238056-trust-location.png

    1. If you are using a 64 bit version of Office, it is recommend to uninstall the 64 bit version to install the 32 bit version.

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in email-notifications to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Pete Hadden 1 Reputation point
    2022-09-27T22:14:50.177+00:00

    I have the same problem although I arrive at it slightly differently - see my question post "Problems creating Word documents programatically".
    Word won't let me add C:\Users\MYUSER\AppData\Local\Microsoft\Windows\INetCache\Content.Word to the trusted locations list - it refuses. I think Word assumes I am opening a Word document (containing macros) from the Internet, when in fact I'm not, I'm just using MS Access to open the file using VBA. I t doesn't matter what I add to trusted locations, or what the macro security settings are in Word - it works once, and then stops with the same error message shown in Rodrigo's post.

    It works fine using 32 bit Access and Word - but my customers all have the 64 bit version installed.

    0 comments No comments