Visual Basic Error with .dotm File

Anonymous
2020-12-29T00:01:02+00:00

Hello, 

I asked the macro/template developer and Microsoft customer service for help already, but neither could help me out. I have a .dotm file that won't work on my Word. I have 365 (version 16.44) on a Mac (operating system: Big Sur). Whenever I open the template, it gives me: "Microsoft Visual Basic - Unexpected Error (50001)" as well as "Microsoft Visual Basic - Can't operate code in break mode". I know people who have a mac and my version of word and the .dotm file works for them, so I suspect I'm having some error specifically. I've tried uninstalling and reinstalling Word twice as well as uninstalling and reinstalling the Macro x5 times. I've also turned on "allow macros" on my preferences and there doesn't appear to be any add-ins to be stopping functionality. I'm mostly at a loss as to why this isn't work, so I would love any help. 

Thank you!

Move from*[Word/Mac/Microsoft 365 Apps or Office 365 for business*]

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
{count} votes

14 answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 322K Reputation points MVP Volunteer Moderator
    2020-12-29T02:32:40+00:00

    You would need to include the code from the template for anyone to be able to help you.

    0 comments No comments
  2. Anonymous
    2020-12-29T03:17:18+00:00

    Hi InduP_0518,

    I apologize for all the trouble it has caused and sorry about your time.

    As per your description, in your Word version 16.44 on Mac OS Big Sur when you try to open the template, you will get error message “Microsoft Visual Basic - Unexpected Error”. However, you tried uninstalling and reinstalling Word and Mac OS many times, but you meet same issue. I do understand the inconvenience it has made and apologize for it and I appreciate your time and effort.

    It sounds like you have an add-in installed that has a bug in it or you have an add-in that most likely needs to be updated. Do you use Adobe Acrobat or other software that adds functionality to Word?  If so, install updates for your add-ins. If not, you can go to the Tools menu and choose Templates and Add-ins and deactivate any add-ins you have.

    Also, please choose Tools>Templates and Add-ins and let us know what you see in the Global Templates and Add-ins field.

    Image

    Here are the more suggestions:

    1. Try to delete the .dotm file, try to restart your Mac and check whether the issue still exists.
    2. Remove the cache and check whether the issue happens or not

    Go to your user library, click Containers, remove folders like com.microsoft.word

    1. Disable the add-ins and check whether the issue still exists.

    Disable the 3rd party add-ins: Go to Apple menu>System Preferences> Extensions> disable all third-party extensions.

    If the issue still exists, please tell us more information below to let us help you:

    1. Does the issue also exist in other apps?
    2. Before the issue happened, have you installed or updated other programs?

    I appreciate your patience and understanding.

    Best Regards

    Waqas Muhammad

    0 comments No comments
  3. Anonymous
    2020-12-29T03:58:15+00:00

    Hi Waqas, 

    Thanks for your suggestions! 

    Re: Adobe -- Yes, I use it. I checked for updates and it's all up-to-date. As for other apps with add-ins, I'm not sure that I have any others. I used to have Zotero, but I completely deleted it as per the instructions on their website and I'm not seeing any lingering Zotero files. 

    Here is what I see in Templates: 

    Re: suggestion #1 -- When I use the normal template, I haven't experienced any issues. The issue is just with my ability to use the other .dotm template. I could delete or leave the file and still be able to use Word fine for most other functions. 

    Re: cache -- I don't have any cache currently as I just re-installed all of Office. 

    Re: disable add-ins -- I don't see an option to turn off third party extensions, but when I browse through the menu I don't see that there are any third party anyway (it's all Mac software). 

    Re: does it happen in other apps -- I have a template in Excel that works great, so I think the issue is pretty much confined to Word. 

    Re: previous history -- I actually just updated computers. My previous computer was old enough to allow me to use Word 2011 so I actually was using that to run this macro where it worked fine on that version of Word. On my new computer, I can't run 32-bit apps so I moved over to Office 365, which is how I ran into this issue. I know people who can use the macro on their Office 365, so I think it's not a software compatibility issue but I have no idea. 

    Thank you for your help thus far! 

    Indu

    0 comments No comments
  4. Anonymous
    2020-12-29T04:10:16+00:00

    Hi Doug, 

    Thanks for letting me know. I'm actually not sure how to do that. I tried Googling it with no luck. It's this macro mac version 5.2 if you would like to download it to see. If you don't feel comfortable downloading it, if you could let me know how to get the code for you that would be great. There is a scpt file that comes with the .dotm file, so I put screenshots of it below. I'm not sure if that's helpful to you or not, but just in case! 

    Image

    Image

    Image

    Image

    Thanks!

    Indu

    PII is mask by MSFT

    0 comments No comments
  5. Anonymous
    2020-12-29T05:39:36+00:00

    Hi InduP_0518,

    We appreciate that you spent your precious time doing those tests and shared updates with us. I do understand the inconvenience it has made and apologize for it. 

    Based on your description, it seems issue only happen to other “.dotm” template that include macro in your Word .dotm template  . However normal template in Word work fine. 

    Based on my search, the error about "Microsoft Visual Basic - Can't operate code in break mode" may have two possible cause:

    1.Please refer to the link, if there’s any code like “stop” to suspend the macro, the error may occur.

    Disclaimer: Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites or any support related to technology.

    2.Try to refer  this KB: Can't execute code in break mode, when users meets syntax error or run-time error,  the code may be suspended in break mode.

    Since, issue might be related with macro, to make sure you get the proper assistance, we’ll move this post to Microsoft programming category.

    I appreciate your patience and understanding.

    Best Regards

    Waqas Muhammad

    0 comments No comments