A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Macros are disabling certain features



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 13th 06, 05:17 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Macros are disabling certain features

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.)

Ads
  #2  
Old February 13th 06, 08:37 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Macros are disabling certain features

Can you post your code so we can try to reproduce the behaviour?

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

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.)


  #3  
Old February 14th 06, 03:48 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Macros are disabling certain features

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.

  #4  
Old February 14th 06, 04:10 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Macros are disabling certain features

That's Word VBA! This is an Outlook VBA forum; you're issues may be better
addressed in the microsoft.public.word.programming group.

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


" wrote:

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.


  #5  
Old February 15th 06, 04:34 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 3
Default Macros are disabling certain features

Technically yes, but since Word is set as my email editor, when I'm in
Outlook and I choose ToolsMacrosRecord 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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deactivate features Bob Becker Outlook - General Queries 2 February 10th 06 06:42 PM
Two MSProject-Outlook macros that allow them to exchange information Rick Williams Outlook and VBA 2 January 25th 06 09:49 PM
Copy 1 Text Field into another on Form, DateAdd and macros Michael Anderson Outlook and VBA 9 January 18th 06 10:37 PM
problem enabling macros [email protected] Outlook - General Queries 1 January 16th 06 03:18 PM


All times are GMT +1. The time now is 07:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.