![]() |
#1
|
|||
|
|||
![]()
Hi Hi
Is there a macro that could 'force' users to enable macro before opening the file? Thanks |
#2
|
|||
|
|||
![]()
If you're referring to the warning that Office gives when opening a macro-enabled document, like docm or dotm, what we do is place the file in a trusted folder for the user. In our environment, that is in the user's STARTUP folder, at %APPDATA%\Roaming\Microsoft\Word\STARTUP
You can see what locations are trusted on your system by looking in your Trusted Locations. From Word, Options > Trust Center > Trust Center Settings > Trusted Locations Does that help? |
#3
|
|||
|
|||
![]()
Hi BrianHoard
It didnt seem to work. I have a turn around solution, it is to password protect the file, and user can only edit the file when user click on 'enable content.' But the macro that i wrote cannot work perfectly. Error message encountered when user save the file, and then close the file without saving the file. When user exit the file like that, the file was not save and became password unprotected. When user try to access the file the next round, there is error message. Is there anyway to go about this? |
#4
|
|||
|
|||
![]() Quote:
|
#5
|
||||
|
||||
![]()
If the aim is to allow the user to edit only part of the document, e.g. in your sample to add the name and address, you don't need a macro. You can use content content controls to accept the user input and add editors to the controls before protecting as read only and then the user can only edit the content control contents. See attached (the password is the same as your sample).
The easiest way to do this is to use Insert Content Control Add-In which includes the options to add editors and protect the document. It can be done without, but it is more fiddly to do so.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Autorun macro when opening the file | Tom cheeseburger | PowerPoint | 2 | 07-07-2021 05:42 PM |
![]() |
laurieli | Office | 7 | 01-17-2016 08:56 AM |
How to automatically enable macros upon opening the Word? | laurieli | Word VBA | 2 | 12-22-2015 02:46 PM |
![]() |
donaldadams1951 | Word | 2 | 02-26-2014 10:47 PM |
![]() |
gmanword | Word VBA | 5 | 11-30-2013 02:55 PM |