View Single Post
 
Old 11-13-2021, 10:09 AM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,529
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by a_scribe View Post
I went back to basics and generated a new Normal template in Word, customized it, imported my macros into it and reinstated keyboard shortcuts, and it worked fine for a while, but I'm now finding that I can't seem to add any new macros to the list - or the ones I'm adding do not end up in the macros menu list.

Earlier, I could view all the 'old' macros in VBA, but now, while they're still still in the macros menu, I can't see them in VBA. Earlier, I could add and record macros and all my keyboard shortcuts were working. Now they don't work at all, even though the shortcuts are still there under Options. It feels as though someone happens through the day and things stop working. Now even the macros I add (either through creating a new macro or copying the macro straight into VBA) don't appear in the menu. Presumably they should be in the Modules folder, but both NewMacros and NewMacros1 are 'unviewable'.

In VBA, under Normal, I have subfolders Microsoft Word Objects and Modules. Under Modules I have AboutNoteStripper, NewMacros and NewMacros1. Then there is a Project folder (same level as Normal), which is the current document, which has two subfolders, Microsoft Word Objects and References.

Can anyone please help? (I am using Word 365, but there was no option to select anything newer than 2019.)
The modules are the primary holders for basic macros. NewMacros is the module that holds any recorded macros unless you later move them.

If a macro is private, it will not show up in the macros list (Alt+F8) nor can it be called with a keyboard shortcut. It can be run from another macro or from the vba editor.

Here is a screenshot from my Normal project in the vba editor.

Again this is not where I hold the macros I use on a regular basis. (The exception in the mBackupNormal module which is explored here: Backup Normal.dotm template using a macro.) These all hold code that I have developed or picked up over the years that can be useful. The code used for my work is stored in other templates (Add-Ins or Global Templates). I have been gathering these since around 1998 when I picked up the book Word 97 Annoyances.

Public macros that are stored in Global templates will show up in the macros list but will not be available for editing in the vba editor unless that template is somehow open (as discussed earlier). Projects that show up in the editor project explorer that are not viewable are usually loaded Add-Ins.

Are your templates stored on OneDrive or SharePoint? Like Andrew, I can anticipate this as a problem if your User Templates location is a cloud folder. I store mine in DropBox on my computer's hard drive sync folder without problems. If they were in the cloud location, I would anticipate problems, as well. Again, mine is on my hard drive, synced to a cloud location rather in a cloud location synced to my hard drive.
Reply With Quote