# [SOLVED] Macro Won't Run



## IanGreen (Feb 25, 2012)

I have a Word macro which performs a mail-merge direct to Outlook, with the Word document becoming an attachment, aqnd allowing an email to be produced..

I have used this macro on several occasions without problem.

About a week ago I tried to use the macro and, despite my macro settings being correctly set etc., I received an error message, on the final stage of the mail-merge, saying my macro settings had prevented the macro from being run.

Since then I initially "repaired" my Office installation, this did not make any difference.

In sequence I then (a) uninstalled/reinstalled Office, which made no difference; (b) Completely re-installed my O/S (Win7) and ALL my applications, including Office.

Unbelieveably, this still fails to allow the macro to run.

I am at my wits end, and despite contacting the author of the macro, who showed no interest, I would be grateful if anyone could help me in this matter.

Thank you,

Ian


----------



## macropod (Apr 11, 2008)

*Re: Macro Won't Run*

Hi Ian,

Did it occur to you the check & adjust your macro security settings? It would be a pity to waste time doing all you've done without attending to what the error message suggests is in need of attention.


----------



## IanGreen (Feb 25, 2012)

*Re: Macro Won't Run*

Hi Paul

No I've been caught that way before, so I check the settings when I start, I check the settings when I choose my data file, (in both Word and Excel) and I check again just before trying to finalise the merge, and again immediately after getting the error message.

Everything is as it should be at all stages.
Except, of course, the macro won't run!!!!

Ian


----------



## macropod (Apr 11, 2008)

*Re: Macro Won't Run*

Hi Ian,

Given that you've done a complete reinstall and you say the macro security settings are correct, about the only things that leaves are:
• interference from another addin;
• conflict with a recent Windows/Office update; and/or
• a bug in or security issue with your macro code.
With the first, the message might not actually be cause by your code, but by the addin itself. What non-Office addins do you have installed? I doubt it's the result of a recent Windows/Office update (I'd expect to have seen more reports by now) and your own macro could only produce such a message if it required administrator privileges and you're running it without them. I can't see how a bug in your code could produce an error message of the kind you're reporting, though.

You may also be interested in the macro here: Merging With Attachments or, perhaps, this addin: MAPILab - Mail Merge Toolkit- mail merge in Word, Outlook and Publisher: 2000, 2003, 2007, 2010


----------



## IanGreen (Feb 25, 2012)

*Re: Macro Won't Run*

Hi Paul,
Thank you for your input.

I have no add-ins, so there can be no conflict there.
I always keep my system fully updated, but as I do not use the macro on a daily basis, it is possible I have installed dozens of updates, of many varieties, since its last use.
But as you say, you have not been made aware of any problems, it does appear unlikely they are the cause.
A bug in, or security issue with the code therefore appears the most likely cause.
I am not a programmer, and know little of the peculiarities of macros.
Is there any way in which the code may be "tested" outside of the Word/Excel/Outlook environment ???

Further question.
My last re-install was not done from a reboot/format point, but was carried out simply from the CD.
If anything were "lurking" on my drive (goodness knows what) there is every possibility that it may still be there, if I understand things properly.
Would you suggest a complete reboot - partition format and re-install?

Ian


----------



## zyzzyva57 (Feb 26, 2012)

*Re: Macro Won't Run*

I have found when I do a reinstall, I uninstall with Revo's Free Uninstaller so I can be sure my registry is clean for the re-install

The registry holds settings when the Window's Uninstaller is used, so your new re-install is not truly a new

For example, this is one way uninstalling a Trial program, then doing a reinstall, the program "knows" you have used up your trial


----------



## macropod (Apr 11, 2008)

*Re: Macro Won't Run*



zyzzyva57 said:


> I have found when I do a reinstall, I uninstall with Revo's Free Uninstaller so I can be sure my registry is clean for the re-install


Since Ian has already reinstalled everything, including the OS, Revo Uninstaller isn't going to help one iota. And, as reinstalling the OS and thew applications hasn't resolved the issue, using Revo Uninstaller beforehand wouldn't have helped either.


----------



## macropod (Apr 11, 2008)

*Re: Macro Won't Run*



IanGreen said:


> I have no add-ins, so there can be no conflict there.
> I always keep my system fully updated, but as I do not use the macro on a daily basis, it is possible I have installed dozens of updates, of many varieties, since its last use.
> ...
> A bug in, or security issue with the code therefore appears the most likely cause.
> ...


Not really - macros need a host application within which to run. If you originally obtained the macro for a previous Windows/Office version, it may also be that the macro is not compatible with your current Windows/Office versions.


> My last re-install was not done from a reboot/format point, but was carried out simply from the CD.
> If anything were "lurking" on my drive (goodness knows what) there is every possibility that it may still be there, if I understand things properly.
> Would you suggest a complete reboot - partition format and re-install?


That shouldn't make any difference, as a fresh reinstal of the OS wipes out whatever was already there. A repair install may leave traces (including Windows updates & application updates), but then you wouldn't have need to reinstall any apps that were already installed, either.


----------



## IanGreen (Feb 25, 2012)

*Re: Macro Won't Run*

Hi Paul

I have dug out some earlier versions of the macro from my backups, and worked my way backward in running them.

I have found one which does work, albeit without some of the "benefits" meant to be attributed to the latest version.

As a result of this, I can only deduce that the latest version is corrupt in some way, even though I have only just downloaded it from their website.

I would like to thank you for all your efforts in this matter, it was all greatly appreciated.

Ian


----------

