![]() |
#1
|
|||
|
|||
![]()
Hi all
I have a word document that contains macros. When someone opens this document they will be prompted to enable macros or not, I understand this. However what I need is a way to close the document if macros are not enabled. Basically I cannot have people opening the document without macros enabled but understand they must choose this. If they decide that they do not want to enable macros I need the document to close as a lot of the document is protected. If this is not possible then the whole concept of protecting a document is nothing more than a joke. Although I agree the user should have the choice to enable or disable macros surelty a developer has the right to deny access to thier document if macros are not enabled really need help with this one many thanks |
#2
|
||||
|
||||
![]()
Hi David,
Users can configure word to run macros without the prompt, but this is unsafe. If macro-enablement is essential to your process, then you need to design the document so that its content is locked (eg by applying forms protection to the whole document) until the macro unlocks it and, perhaps, so that the content is re-locked when the document is closed.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
thanks for replying macropod
the problem I would have with your solution is I am only locking certain parts of the document, not sure how I woudl lock everytrhing and then unlock the bits I want if macro enabled. Is there not a way to quite simply close the document if macros not enabled. thanks |
#4
|
||||
|
||||
![]()
hi David,
To be able to lock (ie protect) only certain parts of a document, you're presumably using forms protection and Section breaks. In that case, a Document_Open macro in the document's 'This Document' module could be used to unprotect the Sections that shouldn't be locked. This could be extended to unlocking formfields, etc, if you use them. A Document_Close macro would reverse the process. If the user prevents macros from running, they wouldn't get access to the editable Sections. As for automatically closing the document, that would require a macro - which would be susceptible to the same macro permission issue.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Finding WINWORD.EXE file in Office 2010 to enable hotkey | jatassoc | Word | 0 | 10-29-2011 09:36 AM |
Disable/Modify MOC.exe | worthydaydream | Office | 3 | 04-23-2010 10:43 AM |
Macro Issue | Basanth | Excel | 1 | 12-05-2008 08:07 PM |
Enable/Disable Macro in Outlook | JimDandy | Misc | 0 | 05-11-2006 06:17 AM |