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: Oldest
  1. Jim G 134.1K Reputation points MVP
    2019-09-22T13:23:26+00:00

    Hi

    I'd like to attempt to reproduce the problem, but need a few more details.

    Where is your Calendar.docx file (the whole file path, please)?

    My hunch is Apple's screwy sandboxing scheme is causing havoc, but I want to test my hypothesis.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-09-22T15:03:20+00:00

    Thanks for your persistence.  

    I wonder about the sandbox hypothesis  since Macros work fine on the 2010 version Word, which is still on my MacBook which has always had the latest version of the OS, currently Mojave 10.14.6.  Since I rarely use my MacBook for word processing, I've kept the 2010 version even tho it's no longer supported.  So the problem would, I presume, have to be with my iMac hardware since it and MacBook, have the same operating system.  That seems improbable to me, but I'm not a computer expert.

    One other possible clue, for whatever it's worth.  After I installed the Home and Office 2019 version of Office Suite on my iMac, it began shutting down randomly and with increasing frequency.  I spent a lot of time with Apple trying to solve that problem without success, then one day I mentioned that I had a problem with macros in Word in my recently installed version of Office Suite, which was the only app I had on my iMac that I didn't have on my MacBook, and wondered if Office Suite could be the source of the shut-down problem.  They walked me thru partitioning my hard drive and setting up the new compartment without Office Suite. The shutdowns stopped and I've never had a problem with them in the 10 or 11 months since, except when Microsoft asked me to install the Suite in the new hard drive compartment in connection with a follow-up call I made to them about the problems with Word.  In other words, when I installed Office Suite in the new hard drive compartment, the computer began to shut down randomly again, and I removed Office Suite  from the new compartment with Apple help, no small task as just sending the app to Trash didn't do the job.  There were Office Suite files all over the place, most in various Library folders which I didn't know how to access without Apple help.  

    I don't know whether the shutdown problem still exists, since I haven't tried the Home and Student version since I took it off the new hard drive compartment, which is the only one I use, but I have not had the problem with the professional version of Word I bought several weeks ago.  That could be because the problem resides elsewhere in Office Suite than Word, but it, of course, could also be because the defect didn't exist or was corrected in the professional version.

    The path: I start the Macro with Command O, then click on

    Documents [a folder]

    Lists [a sub-folder]

    Calendar [the file]

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-09-23T11:52:52+00:00

    Jim, it just occurred to me to take a screenshot of the debug message I get when a macro stops working, but I can’t figure out how to transfer it to you without an email address, so here’s a transcript of the part of the screen that “explains” the problem with opening the file:

    “Documents.Open FileName:=“CALENDAR.docx”, ConfirmConversions:=False,_

          ReadOnly:False, AddToRecentFiles:=False, PasswordDocument:=””,,_

          PasswordTemplate:=””, Revert:= False, WritePasswordDocument=””,_

          WritePasswordTemplate=””, Format:=wdOpenFormatAuto, XML Transform:=””

     If you want to see the whole screen, give me an email address and I’ll send it as an attachment, or, if there’s a way of inserting it in a community message, let me know.

    Richard Greene

    Was this answer helpful?

    0 comments No comments
  4. 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
  5. 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