![]() |
#1
|
|||
|
|||
![]()
I've added a macro to VBA in the Normal project, so it will be saved in Normal.dotm. The macro runs in Word. When I try to save the macro, I get the message "This file is in use by another application or user. (C:\Users\wardw\AppData...\Normal.dotm)"
When I click OK in the message, a Save As dialog opens, suggesting I save the Normal.dotm file in the above directory. If I try to save it there, I'm told I can't replace the existing Normal.dotm file because it's read-only. If I close Word to ensure that Normal.dotm isn't in use, of course the VBA app closes as well and loses the unsaved macro. In the Normal.dotm file's Properties under Attributes, the Read-only box is not checked. Is there a way to escape this seeming paradox? |
#2
|
||||
|
||||
![]()
It sounds like you have an orphaned lock file. This will occur is Word crashes and is not addressed.
Close Word and see https://www.gmayor.com/what_to_do_when_word_crashes.htm with regard to lock files.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
||||
|
||||
![]()
In the past I seem to recall issues where Outlook uses Word as the email editor and it could be causing the lock. Perhaps make sure Outlook is closed too in case that is the issue.
In any case, the macro doesn't have to be saved into Normal.dotm. You could save it to another document and SaveAs that file to make it a docm or dotm file.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#4
|
|||
|
|||
![]()
Thanks, Andrew. I don't have Outlook on my computer, but I saved the macro as Normal1.dotm, and that seemed to work.
Thank you, too, Graham. I deleted the temp files, but no joy. I hesitated to follow all the recommended steps for digging out and deleting the rest of the files fear of deleting something vital, but I've bookmarked the page because it will be useful for more important Word crashes. |
![]() |
Tags |
macro, normal.dotm, save |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to use a "Save As" button without causing digital signatures to become "Invalid"? | jferg | Word VBA | 0 | 02-16-2016 03:04 PM |
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas | jocke321 | Word VBA | 2 | 12-10-2014 11:27 AM |
Disable "Save" & "Save As" & "Print" ribbon | Villalobos | Word VBA | 3 | 07-14-2014 11:37 PM |
![]() |
Dom37 | Word VBA | 2 | 10-31-2011 03:28 AM |
"Microsoft Excel Application" missing in the "Component Services" on win08 | sword.fish | Excel | 0 | 02-26-2010 02:09 PM |