Can someone help me enable Macros?
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Can someone help me enable Macros?
Hi All,
I can't seem to enable macros in Word 2010. I went to the trust center and enabled them, but they are never enabled. I never even get the yellow bar where you're supposed to get the option to enable them. I'm really frustrated because I only wrote a bit of code to help me do a repetitive task, but Microsoft won't let me run *MY OWN CODE THAT I WROTE* and I don't understand why. Here's what I've tried so far.
I enabled "Show the Message Bar" in the Trust Center, but despite this I never get the message bar, I only get an error message saying that macros are disabled and I should check help.
I tried creating a self certification. It didn't help, all it did was "protect" my document until the next time I edited it, then it told me my document was unsafe because it had been edited and that the certificate was removed. Some big help, eh?
I added every folder I could think of to "Trusted locations" in the trust center. I even included subfolders. Although I only have one document in one folder. But this has not helped one bit.
Under "Trusted Documents" I took the risky act of trusting all my documents on my network. Since I'm the only user on my network and I'm behind a both a hardware firewall and M$'s own firewall, there is zero risk there, but yet I had to take it.
Nothing is checked under Add-ins. I don't have any at the moment, and after this experience, I doubt I ever will.
Under Active X, I have everything enabled even thought I'm told this is super risky. Oh well. It didn't help anyway.
Under Macro Settings I checked the super risky Enable All Macros. Now why doesn't this help? I am so flabbergasted that this was not the answer to my being able to run the ONLY macro that I have, that I wrote with my own hands and brain!?!
Can someone help?
Thanks in advance,
Cecilia :)
I can't seem to enable macros in Word 2010. I went to the trust center and enabled them, but they are never enabled. I never even get the yellow bar where you're supposed to get the option to enable them. I'm really frustrated because I only wrote a bit of code to help me do a repetitive task, but Microsoft won't let me run *MY OWN CODE THAT I WROTE* and I don't understand why. Here's what I've tried so far.
I enabled "Show the Message Bar" in the Trust Center, but despite this I never get the message bar, I only get an error message saying that macros are disabled and I should check help.
I tried creating a self certification. It didn't help, all it did was "protect" my document until the next time I edited it, then it told me my document was unsafe because it had been edited and that the certificate was removed. Some big help, eh?
I added every folder I could think of to "Trusted locations" in the trust center. I even included subfolders. Although I only have one document in one folder. But this has not helped one bit.
Under "Trusted Documents" I took the risky act of trusting all my documents on my network. Since I'm the only user on my network and I'm behind a both a hardware firewall and M$'s own firewall, there is zero risk there, but yet I had to take it.
Nothing is checked under Add-ins. I don't have any at the moment, and after this experience, I doubt I ever will.
Under Active X, I have everything enabled even thought I'm told this is super risky. Oh well. It didn't help anyway.
Under Macro Settings I checked the super risky Enable All Macros. Now why doesn't this help? I am so flabbergasted that this was not the answer to my being able to run the ONLY macro that I have, that I wrote with my own hands and brain!?!
Can someone help?
Thanks in advance,
Cecilia :)
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Can someone help me enable Macros?
Just taking a chance here...
See the last reply in this short thread regarding Auto_Open macros: http://superuser.com/questions/354792/o ... cro-issues
Might this be the scenario you are having?
See the last reply in this short thread regarding Auto_Open macros: http://superuser.com/questions/354792/o ... cro-issues
Might this be the scenario you are having?
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Re: Can someone help me enable Macros?
Hi Rudi,
It was a good chance, but no go. I do not ever, NEVER have I ever seen the yellow message bar that is supposed to allow me to temporarily enable macros. If so, I would have just dealt with clicking the stupid button ad infinitum. But the problem is that I've never EVER seen the message bar which means I can't run my macro at all.
Also I have no auto-open macros. Since the other issue is deprecated code, here is the content of my macro, you'll see there isn't much complicated there, and if anything in it is deprecated, I haven't a clue what it could be. (most of it I wrote using the macro recorder anyway, just to make sure I hit all the defaults)
It was a good chance, but no go. I do not ever, NEVER have I ever seen the yellow message bar that is supposed to allow me to temporarily enable macros. If so, I would have just dealt with clicking the stupid button ad infinitum. But the problem is that I've never EVER seen the message bar which means I can't run my macro at all.
Also I have no auto-open macros. Since the other issue is deprecated code, here is the content of my macro, you'll see there isn't much complicated there, and if anything in it is deprecated, I haven't a clue what it could be. (most of it I wrote using the macro recorder anyway, just to make sure I hit all the defaults)
Code: Select all
Sub runme()
Dim strFileName As String
strFileName = ActiveDocument.Path & Application.PathSeparator & "RUS"
With ActiveDocument
.Fields.Update
.SaveAs2 strFileName
.PageSetup.OddAndEvenPagesHeaderFooter = False
.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers.StartingNumber = 1
.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text = Date
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ".Index"
.Replacement.Text = "zzz.Index"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseStart
Else
.Collapse Direction:=wdCollapseEnd
End If
.Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseEnd
Else
.Collapse Direction:=wdCollapseStart
End If
.Find.Execute
End With
ActiveWindow.ActivePane.View.ShowAll = False
ActiveWindow.ActivePane.View.Type = wdOutlineView
Selection.WholeStory
ActiveWindow.ActivePane.View.CollapseOutline Range:=Selection.Range
Selection.WholeStory
Selection.Sort ExcludeHeader:=False, FieldNumber:="Paragraphs", _
SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending, _
FieldNumber2:="", SortFieldType2:=wdSortFieldAlphanumeric, SortOrder2:= _
wdSortOrderAscending, FieldNumber3:="", SortFieldType3:= _
wdSortFieldAlphanumeric, SortOrder3:=wdSortOrderAscending, Separator:= _
wdSortSeparateByTabs, SortColumn:=False, CaseSensitive:=False, LanguageID _
:=wdEnglishUS, SubFieldNumber:="Paragraphs", SubFieldNumber2:= _
"Paragraphs", SubFieldNumber3:="Paragraphs"
If ActiveWindow.View.SplitSpecial = wdPaneNone Then
ActiveWindow.ActivePane.View.Type = wdPrintView
Else
ActiveWindow.View.Type = wdPrintView
End If
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "zzz.Index"
.Replacement.Text = ".Index"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseStart
Else
.Collapse Direction:=wdCollapseEnd
End If
.Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseEnd
Else
.Collapse Direction:=wdCollapseStart
End If
End With
ActiveWindow.ActivePane.View.ShowAll = False
Selection.GoTo What:=wdGoToSection, Which:=wdGoToFirst
MsgBox "Done!"
End Sub
-
- GoldLounger
- Posts: 3081
- Joined: 24 Jan 2010, 19:07
Re: Can someone help me enable Macros?
Another chance here ... Can't say anything about the code, but first thought was to toggle the "Disable all macros with notification setting".
Then I found this, about the Message Bar not appearing.
http://help.turbolaw.com/hc/en-us/artic ... e-disabled" onclick="window.open(this.href);return false;
But if you dismiss it once, wouldn't it pop up the next time?
Then I found this, about the Message Bar not appearing.
http://help.turbolaw.com/hc/en-us/artic ... e-disabled" onclick="window.open(this.href);return false;
But if you dismiss it once, wouldn't it pop up the next time?
Byelingual When you speak two languages but start losing vocabulary in both of them.
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Re: Can someone help me enable Macros?
Another good chance, but still no go. I've seen that one. It does appear to address a similar problem.
The issue is that the solution is not available to me. When I click File-->Info, there is NO option to enable macros. The three options available to me under Info are Protect Document (with a bunch of options that take me further AWAY from my goal by protecting further), Check for Issues, and Manage Versions.
I've never seen the message bar once, so therefore I've never had the opportunity to dismiss it, not even once.
What I would give for the option to Enable Macros, you have no idea :-/
The issue is that the solution is not available to me. When I click File-->Info, there is NO option to enable macros. The three options available to me under Info are Protect Document (with a bunch of options that take me further AWAY from my goal by protecting further), Check for Issues, and Manage Versions.
I've never seen the message bar once, so therefore I've never had the opportunity to dismiss it, not even once.
What I would give for the option to Enable Macros, you have no idea :-/
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Can someone help me enable Macros?
Just to clarify things...
Is your query that your macro does not run?
Or is your query to do with the macro warnings that are NOT appearing?
I have fairly similar settings to you in my Trust Center, and having copied and tested your code in a sample document, I get no prompts to enable macros (based on my settings) and when i go to the Macros Dialog i can successfully run your macro.
Is your query that your macro does not run?
Or is your query to do with the macro warnings that are NOT appearing?
I have fairly similar settings to you in my Trust Center, and having copied and tested your code in a sample document, I get no prompts to enable macros (based on my settings) and when i go to the Macros Dialog i can successfully run your macro.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Re: Can someone help me enable Macros?
My main query is how to get my macro to run.
However, one of the clues (IMO) is that I don't get the macro warning bar in yellow.
If I could get the macro warning bar to show, then I'd gladly push the button to enable macros. But without the warning bar, I have no Enable Macros to press.
All of the Trust Center settings relevant to Enable Macros are already set; they don't do anything.
Thank you for testing the code. It's fairly simple code. All it really does is alphabetize the headings in the document and set an index properly (actually, those two things in reverse, because I wanted my index to be maintained despite alphabetizing the headings/pages). It is good to confirm that the code is not at fault.
However, one of the clues (IMO) is that I don't get the macro warning bar in yellow.
If I could get the macro warning bar to show, then I'd gladly push the button to enable macros. But without the warning bar, I have no Enable Macros to press.
All of the Trust Center settings relevant to Enable Macros are already set; they don't do anything.
Thank you for testing the code. It's fairly simple code. All it really does is alphabetize the headings in the document and set an index properly (actually, those two things in reverse, because I wanted my index to be maintained despite alphabetizing the headings/pages). It is good to confirm that the code is not at fault.
-
- GoldLounger
- Posts: 3081
- Joined: 24 Jan 2010, 19:07
Re: Can someone help me enable Macros?
Actually first I was thinking about what's been installed; to be honest I don't remember the exact wording, if present as an option, in Office's installation dialogue "add or remove features", but among "Office shared features" there should be an option for VBA. (I.e. using the repair/change programs via the Control Panel). But then the other things shouldn't work?
Byelingual When you speak two languages but start losing vocabulary in both of them.
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Can someone help me enable Macros?
What happens if you start Word in Safe Mode? To do so, press the Windows key, enter
winword /safe
and press Enter and click OK.
Then open a document that contains macros.
winword /safe
and press Enter and click OK.
Then open a document that contains macros.
Best wishes,
Hans
Hans
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Re: Can someone help me enable Macros?
Hi Hans!
Going off what Argus said, I went and uninstalled a bunch of MS Office features then reinstalled them. Following that I did a Windows Update and a bunch of updates I hadn't seen before came up.
And now I can run my macro! Whew.
My only concern is that I still can't manage to get the yellow message bar to appear, but I'd rather be permanently able to run macros anyway.
I had previously (several weeks ago) tried stuff using safemode, as well as running Word as administrator. Word as admin worked once, then it stopped. That was what was so strange about this whole thing, I could manage to get it to run my macro once, then the next time I tried it wouldn't run again.
We'll see how long this lasts ;) Keep your fingers crossed.
Thanks everybody for your help!
Cecilia :)
Going off what Argus said, I went and uninstalled a bunch of MS Office features then reinstalled them. Following that I did a Windows Update and a bunch of updates I hadn't seen before came up.
And now I can run my macro! Whew.
My only concern is that I still can't manage to get the yellow message bar to appear, but I'd rather be permanently able to run macros anyway.
I had previously (several weeks ago) tried stuff using safemode, as well as running Word as administrator. Word as admin worked once, then it stopped. That was what was so strange about this whole thing, I could manage to get it to run my macro once, then the next time I tried it wouldn't run again.
We'll see how long this lasts ;) Keep your fingers crossed.
Thanks everybody for your help!
Cecilia :)
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Can someone help me enable Macros?
There are two main warning bars in Office applications:Cecilia wrote:My only concern is that I still can't manage to get the yellow message bar to appear...
1. Macro Settings (first image below)
- default set to Disable all macros with notification (though I set it to Enable all)
- if default is set, and there are macros in the document/template this will always trigger a warning bar when you open the document
- set to Enable all will stop the warning from appearing
2. Protected View (second image below)
- default set to all three options checked
- if default settings are maintained, this will prompt you to enable the document for editing when the document comes from one of the three sources (internet, unsafe location or Outlook attachment). The prompt will only occur ONCE (meaning that if you close and reopen the document again, it will not prompt you again; unless you have subsequently moved the document to a different location on the PC which is deemed unsafe, to which it will prompt once again...)
- I usually switch these settings off too so that I never get prompted to enable a document, but its not as annoying as the macro settings that constantly prompts!
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Re: Can someone help me enable Macros?
Ugggh, I went to run my macro again today (the last time was when I made this post) and guess what? MACROS ARE DISABLED AGAIN!!!
Why does Microsoft insist on protecting me from myself? Why can't I set things to run and then THEY RUN until I tell them not to???
I am really up to here with this nonsense.
Rudi, with respect to your picture of #1, my settings have looked like that this whole time.
With respect to the picture #2, this document is *not* from the internet, *not* in an unsafe location, and *not* an outlook attachment. I made this file myself, on this computer, using this software. And I've been doing this some 15-20 years now, so I know that *I* am reasonably safe too.
But just for grins I made my settings look like #2, and I still get the message that macros are disabled. And STILL no yellow message bar.
I'm about to hit my head against the wall, although it feels like I already have. Maybe hitting my head will shake things up? Uggggggh.
:( :( :(
Why does Microsoft insist on protecting me from myself? Why can't I set things to run and then THEY RUN until I tell them not to???
I am really up to here with this nonsense.
Rudi, with respect to your picture of #1, my settings have looked like that this whole time.
With respect to the picture #2, this document is *not* from the internet, *not* in an unsafe location, and *not* an outlook attachment. I made this file myself, on this computer, using this software. And I've been doing this some 15-20 years now, so I know that *I* am reasonably safe too.
But just for grins I made my settings look like #2, and I still get the message that macros are disabled. And STILL no yellow message bar.
I'm about to hit my head against the wall, although it feels like I already have. Maybe hitting my head will shake things up? Uggggggh.
:( :( :(
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Re: Can someone help me enable Macros?
I just did this and it ran.HansV wrote:What happens if you start Word in Safe Mode? To do so, press the Windows key, enter
winword /safe
and press Enter and click OK.
Then open a document that contains macros.
Thank you from saving me from a potential brain hemorrhage.
Does this mean anything? How do I fix it? I mean, I really shouldn't have to go to safe mode just to run a macro, right?
Oh, and BTW, still no yellow warning bar, but to be fair, the macro ran.
But then Acrobat was gone, and that is part of the process. So I still have the added job of opening Word again to run Acrobat. What a mess.
-
- Microsoft MVP
- Posts: 1318
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: Can someone help me enable Macros?
Safe mode is a troubleshooting tool. It suppresses loading of Normal.dotm, all add-ins, and all nondefault settings that are stored in the registry. The fact that the macro runs when in safe mode says that one of those three things is the cause of the problem.
The most likely of the three is an add-in. Unfortunately, pinpointing the one add-in that interferes with the macro can be time-consuming. The procedure is to remove or disable one add-in, restart Word (not in safe mode), and test whether the macro runs. Wash, rinse, repeat until you find one add-in whose removal enables the macro, or until you've tried them all. [Alternatively, remove all of them and start adding back one at a time, restarting, and testing until one blocks the macro.]
There are two kinds of add-ins that are of main interest.
The most likely of the three is an add-in. Unfortunately, pinpointing the one add-in that interferes with the macro can be time-consuming. The procedure is to remove or disable one add-in, restart Word (not in safe mode), and test whether the macro runs. Wash, rinse, repeat until you find one add-in whose removal enables the macro, or until you've tried them all. [Alternatively, remove all of them and start adding back one at a time, restarting, and testing until one blocks the macro.]
There are two kinds of add-ins that are of main interest.
- "Template" add-ins are .dotm files stored in the folder %appdata%\Microsoft\Word\Startup. You can remove them by moving them to some other folder and restarting Word.
- "COM" add-ins are usually .dll files stored somewhere in the Program Files tree. To disable them, go to File > Options > Add-ins, set the "Manage" dropdown to "COM Add-ins", and click the Go button; in the next dialog, uncheck one or more.
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Re: Can someone help me enable Macros?
The only add-in that I could have potentially added was Acrobat. And I only did that by running the Acrobat install.
So we're back to the battle of M$ vs Mac, I don't like either because they don't play together nicely.
So we're back to the battle of M$ vs Mac, I don't like either because they don't play together nicely.
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Can someone help me enable Macros?
Do you really need the extra features that the Acrobat add-in offers? Word 2010 can save a document as PDF natively, without using an add-in.
Have you tried disabling the Acrobat add-in, even if only temporarily?
Have you tried disabling the Acrobat add-in, even if only temporarily?
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12605
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Can someone help me enable Macros?
The Adobe add-in gives much more functionality than the native Word "Save as PDF". For example you can control which heading levels are converted to bookmarks; the security of the new document; what happens to comments, footnotes and endnotes; how graphics are converted; which fonts are embedded; ...
StuartR
-
- Administrator
- Posts: 78487
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Can someone help me enable Macros?
Thanks, Stuart, I know that. But many users only need the basic convert-to-PDF functionality.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12605
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Can someone help me enable Macros?
That's a fair question Hans. I was thinking of my own usage
StuartR
-
- StarLounger
- Posts: 89
- Joined: 19 Feb 2010, 16:56
- Location: San Francisco, Alameda, CA
Re: Can someone help me enable Macros?
Yes, this is stuff I need (primarily bookmarks, security, and fonts). :(StuartR wrote:The Adobe add-in gives much more functionality than the native Word "Save as PDF". For example you can control which heading levels are converted to bookmarks; the security of the new document; what happens to comments, footnotes and endnotes; how graphics are converted; which fonts are embedded; ...