![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |