macros disappearing - Word 2019 for Mac

Anonymous
2019-08-21T18:34:26+00:00

When I create macros in the 2019 version of Word for Mac as a way of opening frequently used files, the macros work immediately after I create them, but then anywhere from a few minutes to a day later I get the following error message: "Sorry, we can't find your file.  Was it moved renamed or deleted."  I didn't have this problem with the previous version of Word for Mac or any of the earlier versions of Word I used from back to about the late 1980s, tho those were for Windows-based PCs.

Does anyone have any idea what's causing this problem and how to fix it?

FYI, I'm creating the macros the way I always did, clicking on Tools, then Macros, then Record Macro, then entering in the Keyboard Shortcut box the keys I want to use, then opening the file I want to create access to, then going back to Tools and clicking Macros and End Recording.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

53 answers

Sort by: Newest
  1. Anonymous
    2019-09-27T05:50:44+00:00

    Dear Richard_1931,

    Thanks for your information.

    As it seems that there are several issues related to the macro in Word 2019 for Mac in your environment, welcome to use the feedback tool in the upper-right corner of your app to report the issue to our related team directly so that they can address your requirement with more resources in your environment for further investigation.

    Best Regards,

    Cliff

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-09-26T16:19:59+00:00

    I take it that a file path is the series of commands I use in a macro created for the purpose of opening a file.  As I understand your message, you're saying I can't start the path by clicking Command O, then Documents, then the Document folder that contains the file I want to open, then the file, that instead I have to start at Users.  I still don't understand why this should be necessary since I can start at Command O with the 2010 version of Word that I have on my MacBook and create macros that don't stop working as do those in the 2019 version of Word I have on my iMac.  But I tried starting the path in Finder at Users, actually at McIntosh, that I had to click on first to access Users, then clicked on my User name, then on Desktop, but at that point I got a message that said "The folder “Desktop” can’t be opened because you don’t have permission to see its contents."

    I then tried McIntosh/Users/my User name/Documents and got the same you don't have permission message.

    So where do I go from here?

    I keep wondering why I'm having the problem of macros ceasing to function after a few minutes to a few days with Word 2019 when I'm not having that problem on my MacBook with Word 2010.  It seems to me that there's some sort of programming error in the 2019 version that Microsoft needs to fix, indeed should have fixed long ago after I made them aware in several calls and emails in and after October of last year of the problems I was having with the 2019 version.  But if there's a workaround that will make macros work for me, I'd be happy to use it until the underlying problem is fixed.

    By the way, I haven't tried to use the 2010 version on my iMac because I get the message on my MacBook that it's no longer supported and needs to be replaced by a newer version.  However, as I said, it still works without problem on my MacBook.

    I also have never, as far as I'm aware, moved, deleted or renamed the Calendar and Frequently Called Numbers files, which I've been using in my efforts to create macros that don't self-destruct on my iMac in Word 2019.   I created those files in their current path about 25 years ago moved then to my MacBook when I bought it, and transferred them to my iMac when I set it up, and, as I keep saying, the macros still work fine on my MacBook, with Word 2010, but on my iMac, with Word 2019, the macros work for only a few minutes to a few days, and then I get the error message when I try to use the macro.

    Was this answer helpful?

    0 comments No comments
  3. Jim G 134.1K Reputation points MVP
    2019-09-25T14:07:36+00:00

    To use an absolute file path, change the code slightly.

    This is relative path the recorder recorded:

    ...Documents.Open FileName:="Document.docx"...

    A complete path would look something like this (using the path to your Word document);

    ...Documents.Open FileName:="**/Users/username/Desktop/Test/**Document.docx"...

    Notice the addition of all the enclosing folders with each directory level denoted by a slash to the file path in the second example.

    When you use the complete file path, the location of the document having the macro is not important. However, if you move, delete, or rename the document file or any enclosing folders, the macro will fail.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2019-09-24T22:18:44+00:00

    Sounds like progress, but I need some more help.  

    First, what's a directory?  All I'm aware of as far as the path to the file I'm trying to open when I create the macro is the folder, sub-folder and file, which are in Finder and I access in creating a macro by pressing Command O as part of the macro.  

    I don't subsequently do anything that I'm aware of to move or change the file path of either the document I'm trying to open or the macro I created to open it.  All I do is change the text of documents and save them after I've made changes in them.  In fact, I think the macro for another document I made a macro for along with Calendar, FrequentlyCalledNumbers, stopped working along with Calendar when I'd made no changes in FrequentlyCalledNumbers and tried to access it from Calendar.   I'm not absolutely sure that I didn't change FrequentlyCalledNumbers, but I could try again if that may be what's causing the macro to stop functioning.  However, would that mean that every time I changed the text of a document I'd have to create a new macro?  That would be a non-starter.

    Then there's the fact that I didn't have this problem with Office Suite 2010, and still don't on my MacBook which has only that version.  It seems that whatever is causing the file path to change in the 2019 version of Word didn't do so with the 2010 version, and it's happening now when both computers are running the same version of the Mac OS, so the problem has to be with Word.  

    It seems to me, then, that it's Word that's changing the file path, if that's the problem, not anything I do.  It also imagine that that's a programming problem that Microsoft can and should fix, indeed should have fixed when I notified the company of it last October.

    Meanwhile, is there any way of my avoiding the file path changes in the documents I'm trying to open or the macros, if that's what's causing the macros to fail?  You mention using a complete file path, but how do I do that?  Would it make a difference if instead of accessing the document I'm trying to create a macro for through Command O I clicked on Finder and opened the document that way, I can't see why it would, but I'd be glad to try it if that might solve the problem.  If not that, what, and how do I avoid changing the path to the document I'm trying to open if merely changing the text and saving those changes changes the path?  

    As you can see, my knowledge of the technology is minimal at best and I need macros for dummies type instructions to deal with the problem, if  indeed it's a file path problem.  However, as you also can see, I wonder about that, since I'm doing nothing that I'm aware of to change the file path, but then I'm assuming a file path is the instructions I put in the macro to access the document I want to open with it, but I'm not even sure of that.

    Was this answer helpful?

    0 comments No comments
  5. Jim G 134.1K Reputation points MVP
    2019-09-24T17:15:32+00:00

    Hi

    Thank you. Your last reply explains what is happening. I am now able to reproduce the scenario/

    The Macro recorder recorded a "relative" vs "absolute" file path.

    That means that when you recorded the macro, the CALENDAR file was in the same directory as the Word document that was recording the macro. You save the macro document in the same directory and all is well.

    BUT

    If you move either the macro document or the Calendar document or change the file path of either one, then Word can't find the document and you will get this error.

    If you want the freedom of moving the Macro document, use a complete file path to Calendar.docx but it will still fail if you change any of the path to the Calendar.docx file.

    Was this answer helpful?

    0 comments No comments