Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-15-2011, 11:44 AM
davids67 davids67 is offline macro enable disable issue Windows XP macro enable disable issue Office 2007
Novice
macro enable disable issue
 
Join Date: Nov 2011
Posts: 3
davids67 is on a distinguished road
Default macro enable disable issue

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
Reply With Quote
  #2  
Old 11-15-2011, 11:58 PM
macropod's Avatar
macropod macropod is offline macro enable disable issue Windows 7 64bit macro enable disable issue Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,433
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

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
[MS MVP - Word]
Reply With Quote
  #3  
Old 11-16-2011, 06:01 AM
davids67 davids67 is offline macro enable disable issue Windows XP macro enable disable issue Office 2007
Novice
macro enable disable issue
 
Join Date: Nov 2011
Posts: 3
davids67 is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 11-17-2011, 12:33 AM
macropod's Avatar
macropod macropod is offline macro enable disable issue Windows 7 64bit macro enable disable issue Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,433
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

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
[MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
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

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 09:54 AM.


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