Forum Discussion

guifernandes1607's avatar
guifernandes1607
Copper Contributor
Sep 06, 2022

Word Blocked Macros

Hi
We created some macros to fill in a Word document according to information provided by a third party software called Protheus. The macros were working perfectly, but as of last week, after some Windows/Office update, the macros were blocked by the system and we couldn't use them anymore.
All macros are saved locally on the pc of the person using it.
We already went to the properties of the files and unlocked.
In the Word Trust Center options, we added the macro paths as trusted, including subfolders.
We set it to run all macros.
We have disabled the protection mode for executing files from the internet.
Even with all these settings, it still gives error.

Error Message: Microsoft Office has identified a potential security issue. Microsoft has blocked macros from running because the source of this file is not trusted.
File Path: C:\Users\(my user)\AppData\Local\Microsoft\Windows\INetCache\Content.Word\~WRC0001.tmp
Microsoft has blocked macros from running because the source of this file is not trusted.

The error message path is one of the only ones we couldn't put as trusted, Word doesn't allow to add it as trusted.

Macros are saved in two folders: C:\sc and C:\contrato

  • marbel1492's avatar
    marbel1492
    Copper Contributor

    Hola guifernandes1607 no replies sofar. That's worrying.

     

    Same problem here, except we use a Microsoft Access application instead of Protheus. It was all working without problems for at least 3 years until the 1st of September 2022. Our invoices are generated from Access using a Word template on a local PC and a Word macro on the same local PC. No Internet, no Intranet, no network shares.

    The PC has “Microsoft Office Professional Plus 2021” installed. I read that Microsoft would prevent execution of macros originating from the Internet in this version as from September 2022.

    Nevertheless our local macro (embedded in Normal.dotm) was blocked with the same error messageyou got :

    “Microsoft Office has identified a potential security issue. Microsoft has blocked macros from running because the source of this file is not trusted. File Path:

    C:\Users\(username)\AppData\Local\Microsoft\Windows\INetCache\Content.Word\~WRC????.tmp”

    We tried everything you tried:

    -add template folder to trusted locations

    -add destination folder to trusted locations

    -add C:\Users\......\INetCache\Content.Word” to trusted locations (not allowed)

    -enable all macros (not recommended).

    To no avail. 

    Apparently their latest update wasn’t tested very well. ;-((.

    Please let me know, when you find a sulution. 

     

  • Villi_B's avatar
    Villi_B
    Copper Contributor
    I'm in the same situation, our customers started having the same issue during the month of August. I read that the block had been activated at the end of July. The strange thing is that the first document they open (Word doc with macros) opens flawlessly but the second and following ones get the dialog box about the macros being disabled (with the only option to disable them). The path and file name structure of the non-trusted component is exactly the one you are talking about. This is drving us nuts...
    • What Version and Build of Office are you using. Here, there is no problem in macro enabled templates saved in the Word Startup folde, the Templates folder, or in another folder that was added as a Trusted Location and into which I regularly save macro enabled templates that one of my clients sends to be for modifications after right clicking on those templates and then on Properties and checking the Unblock box. That is with a 64-bit installation of Microsoft 365 Apps for enterprise Version 2208 (Build 15601.20088 Click-to-Run) Current Channel
      • Villi_B's avatar
        Villi_B
        Copper Contributor

        Doug_Robbins_Word_MVP 

        This happens on my PC with Office Professional Plus 2016 with Word documents, also I'm almost sure it happens with another version too. The update history says the last one was 16.0.15330.20196 released in June. Word is 2016 MSO (Bersion 2208 build 16.0.15601.20078) 32 bit. The thing which is confusing us is that the issue appears only on the second and subsequent documents. I checked if the file it says comes from a non trusted location already exists but no, it gest created when I try to open the second document from  Visual Foxpro code via

        obyWord=CREATEOBJECT("WORD.APPLICATION","")

        obyWord.VISIBLE=.T.

        obyWord.APPLICATION.WINDOWSTATE=1
        obyWord.Documents.Open(pathToDocFile, True, True)

        because if I try to open another macro-enalbed doc file with a double click in Windows Explorer I don't get the dialog telling me the macros are being disabled. pathToDocFile points to a file in a folder I added to the Trusted Paths (I'm translating from the italian version) in Office

        And it doesn' happen on every PC

         

  • jaimemfilho's avatar
    jaimemfilho
    Copper Contributor
    Olá Guilherme, estou com esse mesmo problema. pra mim acontece no comando OLE_NewFile, até tirei a macro do arquivo, mas o Windows não entende, fecha o Protheus, e apresenta a caixa de diálogo com o erro.
    Você conseguiu alguma evolução?

    oWord := OLE_CreateLink()

    OLE_NewFile( oWord, cFileOpen )
    • As you appear to be using a third party application - TOTVS Microsiga Protheus, I would suggest that you contact the vendor of that application.
      • marbel1492's avatar
        marbel1492
        Copper Contributor

        Doug_Robbins_Word_MVP 

         

        Still struggling here with the same problem. We call Word from Access. So I’ll have to contact Microsoft or Microsoft. We found that the error message doesn’t appear, when closing all open Word documents before invoking the macro while opening Word from Access. If there is any open Word document (either opened from Access or some other Word document), the macro error reappears. Probably that’s why Villi_B only gets the error message from the second document onwards (see Villi_B above).

         

        Versions:

        Microsoft Word 2021 MSO (Version 2207 Build 16.0.15427.20182) 64 bits

        Microsoft Access 2021 MSO (Version 2207 Build 16.0.15427.20182) 64 bits

         

    • Cristian1690's avatar
      Cristian1690
      Copper Contributor

      jaimemfilho  e guifernandes1607  .. você conseguiu resolver este problema de abrir o WORD pelo Protheus??? fiz vários procedimentos que tem no site na MS mas até agora nao consigo .. tem usuário que funcioana de boa .. tem outros q nao ...