Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2021, 02:27 PM
SSBB SSBB is offline Cannot Find the Right Macro to Edit Windows 7 64bit Cannot Find the Right Macro to Edit Office 2016
Novice
Cannot Find the Right Macro to Edit
 
Join Date: Sep 2021
Posts: 6
SSBB is on a distinguished road
Unhappy Cannot Find the Right Macro to Edit


We have several Macros that are global and on our network for everyone to use. We just went thru a re-branding and now I need to update all of the macros with the new name and acronyms. I looked in my Word file locations and found where Word is getting my normal.dotm from. I went out there and updated all of the macros. When I open any of them, they all now show the correct name. However, when I open Word, go to View Macros, and choose the macros, most of them are fixed with the new name. However, there are still a handfull that still show the old name. How can I find where they are? I have spent hours (at least 20) searching to no avail. I know they are part of the normal.dotm and when in the "view macros" section, the "edit" button is greyed out. When I try the Alt+F11 I get an error saying the "Project is unviewable".
Reply With Quote
  #2  
Old 09-03-2021, 03:12 PM
Guessed's Avatar
Guessed Guessed is offline Cannot Find the Right Macro to Edit Windows 10 Cannot Find the Right Macro to Edit Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If the project is unviewable then you know the template is loaded as an addin. You can make it viewable/editable by opening that file directly (even while it is active as an addin).

If you can see the macro in the View Macros dialog, you can change the 'Macros in' selection to see macros in different templates and thus work out which template the macro resides in.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 09-07-2021, 05:34 AM
SSBB SSBB is offline Cannot Find the Right Macro to Edit Windows 7 64bit Cannot Find the Right Macro to Edit Office 2016
Novice
Cannot Find the Right Macro to Edit
 
Join Date: Sep 2021
Posts: 6
SSBB is on a distinguished road
Default

That's the problem. It shows in the "macros in" that it is part of the "Normal.dotm" file. However, when I navigate out to that file, and open it directly, I am unable to edit the macros. It will let me open the VB window, but when I click on "Normal" to expand it, it shows no macros there.
Reply With Quote
  #4  
Old 09-07-2021, 05:59 AM
gmayor's Avatar
gmayor gmayor is offline Cannot Find the Right Macro to Edit Windows 10 Cannot Find the Right Macro to Edit Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Close Word

Locate the normal template. If you have not changed the default location enter or copy
%appdata%\Microsoft\Templates
to the address window of Windows File Explorer and you will be taken to the folder that contains the default template. Note that this folder is normally hidden.

Set the File Explorer to display hidden items.

See if there are any lock files present - in particular a file named '~$Normal.dotm'. Delete any files that begin with '~$'

Rename the Normal template to (say) oldnormal.dotm.

Restart Word.

Is the macro still present? If it is, it is not stored in the default template, but in another template of the same name, which is almost certainly located in the Word startup folder - If you have not changed the preferred startup folder it can be located (in English language versions of Windows) by typing
%appdata%\Microsoft\Word\Startup
in the Windows File Explorer Address bar and pressing Enter.

If this is the case, close Word again and rename the template in the startup folder to (say) MyMacros.dotm and you can restore your original default template by renaming it back to normal.dotm.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 09-07-2021, 08:52 AM
SSBB SSBB is offline Cannot Find the Right Macro to Edit Windows 7 64bit Cannot Find the Right Macro to Edit Office 2016
Novice
Cannot Find the Right Macro to Edit
 
Join Date: Sep 2021
Posts: 6
SSBB is on a distinguished road
Default

Ok, Here is what I found. Couple notes first as there are a couple of questions as well surrounding locations.
Network locations:
K:\Office2016
K:\Office2016\Startup
K:\Office2016\Startup\Templates
All macros are in both the Startup and the Templates folders.
The normal.dot & normal.dotm are in all three locations
If I open the macro files directly, I am able to go into the developer tab and edit the macros. All macros have been updated this way to show our new company name. However, when I open Word, and then go to View>Macros and run the macro from there, it still showed the old name.
I found in the Startup folder there was also a normal (2).dotm file. I copied this file to a different location and then deleted it. I then opened Word again and went to View>Macros and voila, my changes are there.
Someone else came to me after I finally got this working and asked about changing some names and titles. So, I again went out and opened the macro files, searched thru and changed names and titles (no small feat since we have close to 100 macro files). But again, when I open Word and go to View>Macros, the changes are not there. This time however, there is no "Normal (2).dotm" file to delete.
I found in Word>File>Options>Advanced>File Locations, there are two settings that point to the file locations mentioned above. The first one is "User templates" which points to the Startup folder mentioned above and the other is the "Startup" which goes to the "Office2016" folder mentioned above. Since the normal.dot (which is the file that seems to hold the bulk of the macros), and the normal.dotm are in all three locations listed above, which file gets used and when? I am hoping when I come in tomorrow morning, I will have figured out which one has my changes it in and copy it out to all three locations and be done with it, but it would be good to know exactly what is being used and when so I know going forward.
Thanks for all the help!
SS
Reply With Quote
  #6  
Old 09-07-2021, 04:46 PM
Guessed's Avatar
Guessed Guessed is offline Cannot Find the Right Macro to Edit Windows 10 Cannot Find the Right Macro to Edit Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You have a non-recommended setup. Using a Normal template on a network drive is likely to cause stability and speed issues.

And most likely you are doing this so users are sharing the same Normal template which is a REALLY bad idea, not least because the first person in there locks it for everyone else. It only takes one user in the company to have Word open and an administrator can no longer make changes to the file.

What happens when people use Word when not on the network or on a slow network connection?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #7  
Old 09-07-2021, 09:04 PM
gmayor's Avatar
gmayor gmayor is offline Cannot Find the Right Macro to Edit Windows 10 Cannot Find the Right Macro to Edit Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Furthermore it only takes one user to crash the normal template and no users can use Word.
The normal template is a personal file that must not be shared.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #8  
Old 09-08-2021, 11:30 AM
Peterson Peterson is offline Cannot Find the Right Macro to Edit Windows 10 Cannot Find the Right Macro to Edit Office 2019
Competent Performer
 
Join Date: Jan 2017
Posts: 141
Peterson is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
You have a non-recommended setup. Using a Normal template on a network drive is likely to cause stability and speed issues.

Another reason not to do this: If you use Adobe Acrobat Pro and your Normal template is on a network, under certain circumstances Acrobat can wreck your Normal template (ask me how I know...).
Reply With Quote
  #9  
Old 09-09-2021, 02:16 PM
SSBB SSBB is offline Cannot Find the Right Macro to Edit Windows 7 64bit Cannot Find the Right Macro to Edit Office 2016
Novice
Cannot Find the Right Macro to Edit
 
Join Date: Sep 2021
Posts: 6
SSBB is on a distinguished road
Default

Unfortunately, this is how it was set up long before I came here a year ago. And, I have not used Word Macro's before so what I know about them you can probably fit int a Monopoly thimble.

That said, they have not had any issues with the setup as it is and we do have backup copies of the normal template and all of the macros. Where is the best place to find out the most info in the shortest time on Word macros?

There are a lot of them out there and from what I am being told, no one has done anything (as far as updating them) in roughly 7-10 years. So you can guess what they want me to do now. I have managed to figure out much of the changes they want, but I am still quite confused on some things. One of those being exactly how do we share macros with multiple people across our network if we don't put everything out on the network? And, how does the normal template pull up the macros across several .dot files?

Ex. in the same location with the normal template, there are 5 other .dot files (ex. MacrosA-C.dot, MacrosD-H.dot, etc.)
Reply With Quote
  #10  
Old 09-09-2021, 04:16 PM
Guessed's Avatar
Guessed Guessed is offline Cannot Find the Right Macro to Edit Windows 10 Cannot Find the Right Macro to Edit Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The recommended setup for templates would be to store the master version of the templates on the network and have your IT group run scripts to copy these current templates onto the computers either at startup or on a regular (daily) schedule. If the script checks modified dates and only copies updates across then this isn't a big hit.

If your macros have not been updated for over 7 years then it is highly likely that >90% of them are never used by anyone in the organisation. It might be worth surveying the organisation to find out what macros are in use and focus your efforts on just those ones. If people aren't interested enough to let you know which macros they use then they won't miss them when you remove their access.

Sorting your macros into alphabetical groups is a novel approach. I would have thought they would be grouped by functionality. IF necessary to store these separate to the Normal.dotm then you make them available by loading the secondary templates as addins (either by placing in the startup folder or by using a macro in Normal to load/unload an addin).
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #11  
Old 09-10-2021, 05:09 AM
SSBB SSBB is offline Cannot Find the Right Macro to Edit Windows 7 64bit Cannot Find the Right Macro to Edit Office 2016
Novice
Cannot Find the Right Macro to Edit
 
Join Date: Sep 2021
Posts: 6
SSBB is on a distinguished road
Default

Thank you much for all the advice! I will certainly look into doing them.

I will however say, that the "90%" is probably not accurate here. I know several people have approached me asking if I could fix them. They have been running the macros and then manually making changes to them after because they either got no response when asking others or got a nasty response. Fortunately, those people with the bad attitudes are no longer with the company, and they have me now. I don't mind fixing them, I just need to understand them so I don't totally mess them up!

Thanks again for all the help from everyone!
Reply With Quote
  #12  
Old 09-10-2021, 05:11 AM
SSBB SSBB is offline Cannot Find the Right Macro to Edit Windows 7 64bit Cannot Find the Right Macro to Edit Office 2016
Novice
Cannot Find the Right Macro to Edit
 
Join Date: Sep 2021
Posts: 6
SSBB is on a distinguished road
Default

Oh, one other question...any chance you have a script for copying the files out, that I could modify to work for us?
Reply With Quote
  #13  
Old 09-11-2021, 12:45 AM
Guessed's Avatar
Guessed Guessed is offline Cannot Find the Right Macro to Edit Windows 10 Cannot Find the Right Macro to Edit Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Are you asking for a script that copies updated templates off a network onto a hard drive? I have a vbs script to do this but our IT group recreated that functionality with more elegant features using their preferred scripting language.

Before you get to creating the script, you need to set up your templates and make sure you understand exactly what needs to be done. The structure I recommend are:
1. Do not use Normal for your company-wide templates. This should be a file that is able to be customised by each user as they wish. If you keep replacing it with your 'network' version then you are forcing power users to recreate their own customisations or store them in other locations. You can provide a 'preferred' Normal.dotm as a one-off step to set up default doc styles but it shouldn't be continually restored from the network.
2. Put your company-wide macros in an add-in IF they need to be available for EVERY document irrespective of the specific document type. This template should be written to the user's %appdata%\Microsoft\Word\Startup folder
3. Create specialised template(s) with content/styles/macros/building blocks/etc and load these to the User Templates folder. The users should then create New documents and select one of these specialised templates according to what type of document they want. This template will become the 'attached template' for that document and the macros should be the ones that are specific to that document type and styles.

Once these templates are created and tested manually with a few users you can look at scripting the rollout for all users. The basic script carry out these steps:
1. Find out where the user's machine is looking for the User Templates and Startup folders. If these are network locations, I would recommend you change these settings to local hard drive locations.
2. Copy addin(s) to Startup folder
3. Copy template(s) to UserTemplates or WorkgroupTemplates folder.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
macro, normal.dotm, view macros

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Find the Right Macro to Edit Trying to create a macro to batch edit hyperlinks martinlest Excel Programming 5 01-09-2015 09:34 AM
Cannot Find the Right Macro to Edit Loop Macro to Edit Date damaniam Word VBA 7 02-21-2014 07:12 AM
Cannot Find the Right Macro to Edit Loop Macro to Edit Date damaniam Word VBA 11 12-05-2013 08:28 AM
Challenging Heading Edit with Find Replace binar Word 10 12-23-2012 08:16 PM
Cannot Find the Right Macro to Edit Macro that can find phrase and then find another and copy jperez84 Word VBA 10 09-19-2012 04:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:42 AM.


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