RiskPremium | Measuring the Market Risk Premium | Business library
kandi X-RAY | RiskPremium Summary
kandi X-RAY | RiskPremium Summary
Measuring the Market Risk Premium
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RiskPremium
RiskPremium Key Features
RiskPremium Examples and Code Snippets
Community Discussions
Trending Discussions on RiskPremium
QUESTION
I have built a Word Macro-Enabled Template (.dotm) that works perfectly on my machine when I save it to my Word Startup folder. However, when I send the .dotm
file to my colleagues (some on same environment as me and some not) an error is generated when pressing the custom ui ribbon button:
The macro cannot be found or has been disabled because of your security settings
The macro settings are set to run all macros, the folder containing the template >is a trusted location
.... more help options follow
My colleagues also save the file to their startup folder and load Word. The ribbon shows perfectly, but the macro does not run. My colleagues and I have done a boatload of searching online and cannot figure out the issue, as all my configurations are correct, as far as I can tell, which I will list below:
- Macro Settings: Enable All Macros
- Trust access to the VBA project object model is checked
- Startup folder is established as a trusted location
Custom UI XML
...ANSWER
Answered 2018-Feb-03 at 06:35The most likely reason for the error message is that the macro is not available in the template containing the Ribbon customization. Often, they remain in the Normal.dotm
template on the development machine.
Background:
Something the VBA developer always needs to keep in mind when starting out on a project and testing in Word is that Word works with multiple "contexts". First, foremost and the default when recording macros and creating functionality in the private user environment is the Normal.dotm
template. This is "universal": it comes into play no matter in which document you work, even if that document is attached to a different template.
THe great danger in this is that you may forget to move code meant for a specific template from Normal.dotm
to that template. Or, even if you do copy the code over, if code with the same procedure names is present in both templates, that in Normal.dotm
may keep precedence.
This is especially a problem when assigning macros to Ribbon and QAT buttons. Even if Normal.dotm
from the developer machine is no longer present, the Ribbon or QAT assignment still looks for that and doesn't check for an alternate source.
So if you decide you want to keep the code in Normal.dotm
as well as in the specific template it's a good idea to rename the procedures in Normal.dotm
to avoid conflicts.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install RiskPremium
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page