Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-12-2021, 02:04 PM
a_scribe a_scribe is offline VBA project unviewable and problems with macros and shortcuts in templates Windows 10 VBA project unviewable and problems with macros and shortcuts in templates Office 2019
Novice
VBA project unviewable and problems with macros and shortcuts in templates
 
Join Date: Nov 2021
Posts: 9
a_scribe is on a distinguished road
Default

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.)

Last edited by a_scribe; 11-12-2021 at 02:31 PM. Reason: Add information
Reply With Quote
  #2  
Old 11-13-2021, 10:09 AM
Charles Kenyon Charles Kenyon is offline VBA project unviewable and problems with macros and shortcuts in templates Windows 10 VBA project unviewable and problems with macros and shortcuts in templates Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,530
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
  #3  
Old 11-15-2021, 07:23 AM
a_scribe a_scribe is offline VBA project unviewable and problems with macros and shortcuts in templates Windows 10 VBA project unviewable and problems with macros and shortcuts in templates Office 2019
Novice
VBA project unviewable and problems with macros and shortcuts in templates
 
Join Date: Nov 2021
Posts: 9
a_scribe is on a distinguished road
Default

Thank you, Andrew and Charles. I seem to have two sets of macro modules in VBA:



(I have uninstalled NoteStripper from my PC but it is still showing up.)

The macros menu doesn't show up every single macro. New ones that are in VBA sometimes don't show up but when I try to create it as a new macro I am asked if I want to replace the existing one, and I can 'step into' it easily (so far today). It simply doesn't show up.

The macros menu I get when customizing keyboard shortcuts is not exactly the same one as for customizing the quick access toolbar (in the same document).





I unlinked OneDrive on my computer but it was up and running again today, so I've set it to stop syncing.

I suspect that I'm looking at two different sets of macros here, most of which overlap as they derive from the same source. It's been suggested to me that I delete one of them and see how that goes. That still doesn't explain why a macros in VBA doesn't show up in the macro menu, however.

Last edited by a_scribe; 11-15-2021 at 08:12 AM. Reason: update
Reply With Quote
Reply

Tags
macro help, templates messed up, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message ["Project is unviewable"] when I try to exit Word; despite my running Debug, Compile [ marceepoo Word VBA 2 05-07-2020 03:48 PM
Keyboard shortcuts won't execute macros in Word 2010 kozureokami Word 4 02-26-2017 03:16 PM
Finding keyboard shortcuts for my macros tcantrell Word VBA 1 12-07-2015 02:04 PM
Importing Macros from 2007 with keyboard shortcuts gyro2222 Word VBA 19 03-02-2015 09:33 AM
VBA project unviewable and problems with macros and shortcuts in templates Word 2007 shortcuts and templates harry Word 1 07-15-2010 12:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft