#1
|
|||
|
|||
How to automatically enable the macros upon opening a file with macros?
Hi,
I am wondering how to automatically enable the macros upon opening an Excel or Word file with macros and user forms? So that Users don't have to manually enable them by responding to the Security Warning. Thanks anyone with suggestions or advice! Laurie |
#2
|
|||
|
|||
You can't.
Think about it. You want a macro to run on a machine that won't run macros, not going to happen. If it did, that would totally defeat everything built into MS Office that protects you, me and everyone else from the nasty macros that can do harm. |
#3
|
||||
|
||||
You can - by designating the folder the file is in as a trusted location.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
||||
|
||||
Surely the answer is somewhere between the two? I don't do this much and I'm pretty sure macropod knows more about the practical side of it than I do. But generally speaking, you can "sign" the program, and the intended victim — I mean beneficient — can tell his copy of Excel to trust signed documents, and there you are.
Or if there's such a thing as a trusted folder (I didn't know about that one) then once the user has told Excel to trust that folder then you can move ahead of this problem. If this is on a work computer, probably the admins have set up the trusted folder and the user doesn't have any control over trusting or not trusting documents that reside there; you just have to get them to move your program there, or to give you the authority to do so yourself. I've also been asked, when trying to run one of my own programs from a shared drive, whether I want to make this a trusted document. I infer that if I were to answer Yes it would never ask me again whether to allow macro content in that document. NoSparks' answer wasn't complete wrong, and the principle he described is basically sound. It's just that there are ways to establish trust BY AGREEMENT. |
#5
|
||||
|
||||
Yes, you can sign macros too, but the point remains a simple 'no' is wrong. Office even has some default trusted locations. You don't need the macro creator's involvement to create a trusted location for it. For more, see: https://support.office.com/en-us/art...5-4208b3540a62
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
This question was originally asked in the Excel Programming sub forum so I think it was reasonable to think it pertained to macro programming more so than how to setup Office.
macropod's response was 3 weeks after the fact and, by moving the question to a different sub forum, may have addressed the question that was asked, but the OP never returned so who knows ? |
#7
|
||||
|
||||
Regardless of which forum the question was originally posted in it involved more than just Excel and the answer is the same. All of Office (and that includes Excel) works with trusted locations and signed macros.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
'tis unfortunate the OP posted their question in the wrong sub forum and has never acknowledged any replies.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to automatically enable macros upon opening the Word? | laurieli | Word VBA | 2 | 12-22-2015 02:46 PM |
Can we define macros in a way to not misworking after deleting, renaming or moving the source file? | tesoke | Excel Programming | 10 | 11-13-2015 09:30 AM |
Macros being stripped from dotm file | Brian Muth | Word | 1 | 10-09-2012 10:00 PM |
How to enable PowerPoint Macros? | delete123 | PowerPoint | 3 | 03-27-2012 06:56 AM |
Can Word automatically do "Finish and Merge" after opening file? | DaveBF | Mail Merge | 1 | 09-14-2011 07:56 AM |