Macros are disabling certain features

  • Thread starter Thread starter DontEvenBother
  • Start date Start date
D

DontEvenBother

After running a macro in an Outlook message, the send button, among
others (see below), becomes disabled. I click, but nothing happens.
The button is dead. It no longer changes color when hovered over, and
the icon doesn't animate(visually depress) when clicked upon. The only
time this happens is after running a macro, and it happens without
fail. I've tested it on 3 machines at work as well as my computer at
home.

I have also noticed in testing that it is not just the send button that
becomes disabled. It appears that every button/tool on that row of
toolbars becomes disabled as well. i.e. the Accounts drop-box, the
attachment icon, address book button, options, etc. All other toolbars
continue to function as normal.

I am thinking it is a problem associated with running VBA code in a
message window, but am not sure. I have tried different macros, and
all of them have the same effect on the send button, so I doubt it is
anything specific to the VBA used in any one macro. FWIW they are all
simple, text-string search & replace macros.

Is this a security setting somewhere? I can understand the risk of
macros in Outlook, but I've even tested with my security set to Low,
this still happens.

Any help would be greatly appreciated as this is driving me crazy and
slowing me down having to manually replace text in each message.

Thanks!
Jim
(Using Office XP Pro SP3 with windows XP Pro.)
 
Hi Eric. Let me thank you so much for taking the time to help me with
this problem!

I have gladly posted some code below. I may have isolated the problem
to one Selection.Find statement, but haven't done any exhaustive
testing to be sure something else can't trigger it as well. Here's the
example:

Sub RemovePhone()
'
' RemovePhone Macro
' Macro recorded 2/14/2006 by JG
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^#^#^#-^#^#^#-^#^#^#^#"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

The last statement in the sub -- the Select.Find -- is the only one
that, if commented out or removed, stops the freezing behavior.
 
That's Word VBA! This is an Outlook VBA forum; you're issues may be better
addressed in the microsoft.public.word.programming group.
 
Technically yes, but since Word is set as my email editor, when I'm in
Outlook and I choose Tools>Macros>Record New Macro it apparently uses
Word VBA. Outlook's decision, not mine. I have no control over that
as far as I know. But the biggest problem is that it affects my
*Outlook*, not Word!

I'll post in the word forum, but do you think they will have any idea
why Outlook goes screwy over that line of code? I have a sneaking
suspicion they will tell me to post in an Outlook forum.<g> Is there a
better Outlook forum in which I should post this?

For the benefit of anyone else reading this thread, I have discovered a
workaround. After the macro code freezes the send button and others on
that toolbar, if I ALT+TAB to any other open application, and then
ALT+TAB back, the buttons function fine. Perhaps its losing
application focus and then regaining it could be a clue to someone. I
hate workarounds and would much prefer things work normally.

I do thank you once again for your assistance, Eric. This problem
frustrates me so much, and I'd had no response the last two times I've
posted. I appreciate your trying to help.

Jim
 
Back
Top