Windows in Taskbar faulty in Word 2003

H

HONYAKUKA

I don't know exactly what's causing this, so I can only give an example.

I have a macro that I use to make global changes in a document, such as
converting straight to curly quote marks.

When I have Tools > Options > Windows in Taskbar unchecked, such that all the
Word document icons in the Taskbar are merged into one icon, running this macro
causes the screen to switch to another Word document. Specifically, if multiple
documents are open, this macro will cause the last document listed in the
Windows menu to come forward. (If I run the macro in this document, it stays
forward --- doesn't switch to another document.)

The title bar(?) at the very top of the window will appear in color such that
the document that comes forward looks like it is in focus, but the document
will not really be in focus. I.e., I have to move the mouse/cursor inside the
document to select something to bring it in focus. Otherwise, I can't type in
the document.

This did not happen with Word 2000 and the WordInTaskbar.dot Add-In installed.
(By the way, I have removed this, so the problem is not interference from a
now-redundant Add-In.) Also, it doesn't happen in Word 2003 when Windows In
Taskbar is checked.

For reference, the macro code is as follows. The switching of windows occurs
when the .Execute Replace line runs. (The same problem occurs if I write the
macros as one macro rather than as one macro calling another.)

*******************
Sub FixApostrophesAndQuoteMarks()

Call FindReplaceTextOnceThru("'", "'")
Call FindReplaceTextOnceThru("""", """")

End Sub


Sub FindReplaceTextOnceThru(xFind$, xReplace$)

Select Case Selection.Type
Case wdSelectionIP 'Assume entire document should be changed.
With Selection.Find
.MatchSoundsLike = False
.MatchWildcards = False
.MatchWholeWord = False
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll, FindText:=xFind,
ReplaceWith:=xReplace
End With

Case wdSelectionNormal, wdSelectionColumn, wdSelectionRow
With Selection.Find
.MatchSoundsLike = False
.MatchWildcards = False
.MatchWholeWord = False
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindStop
.Execute Replace:=wdReplaceAll, FindText:=xFind,
ReplaceWith:=xReplace
End With

Case Else
'Do nothing (discontinue macro).

End Select

End Sub
************************

Thanks for any assistance.

Jay
 
B

Beth Melton

Hi Jay,

I'm unable to reproduce what you have described. Does the problem
continue to occur if you start Word using the /a switch? Go to
Start/Run and run:

winword /a

Note the space before the forward slash.

Also, the macro can not be placed in your Normal.dot and if it is in a
global template you need to go to Tools/Templates and Add-ins and
manually load it.

--
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
H

HONYAKUKA

Beth:

(1) I think you may have misunderstood my question (either that, or I
misunderstood the answer --- one or the other).

What is the purpose of invoking the " /a" switch? (In general terms, this
switch prevents Add-Ins from loading upon starting up Word.)

I have already completely removed the third-party Add-In called
WindowsInTaskbar.dot. It is no longer being invoked. Thus, there is no need
to add the " /a" switch -- for this purpose at least. (As I mentioned,
WindowsInTaskbar.dot did NOT cause the problem when I was using Word2000.)

Or, were you suggesting the " /a" switch for another purpose?

Anyway, Word2003 provides its own native "Windows in Taskbar" functionality at
Tools > Options > Windows. This is what I am having a problem with.

(2) Why can't the macro I listed below be placed in Normal.dot? I've never
read this anywhere before, and I've never had a problem before because of
placing macros in Normal.dot (where all my macros are found now). Is the issue
one of causing faulty macro-running, or simply one of preventing Normal.dot
from becoming bloated?



Thanks again.

Jay
 
B

Beth Melton

Hi Jay,

Yes, I think you may have misunderstood. :)

Since I'm unable to duplicate this issue using the macros you
provided, turning off my Windows in Taskbar option, creating a
document containing smart quotes, and opening another document window
then the next step is to rule out installation issues or other
third-party add-ins.

There is another possibility but I need you verify the same issue
occurs when you start Word with the /a switch which will use all
defaults. (With the exception of the Windows in Taskbar option and
your macro of course.)

Starting Word with the /a switch will rule out the possibility that
the cause of the issue is due to your preferences or other add-ins.
Note there could also be COM Add-ins which may or may not be visible
in the interface.

The only reason I suggested you not place the macro in your Normal.dot
was in light of starting Word with the /a switch since your Normal.dot
is by-passed. I would place only the macro in a new template and place
it in your Startup folder. Then after starting Word with the /a switch
go to Tools/Templates and Add-ins and manually load it.

Regarding your question on storing macros in your Normal.dot, There
are those who firmly believe Normal.dot should remain pristine but I
can't say I'm one of them. :)

I store macros in it all the time. Although my most important macros
(and the most difficult to recreate) are stored in global templates
since they provides a little more protection and isn't as susceptible
to corruption or macro viruses. Plus I tend to load them as needed
rather than allowing them to load when Word starts.

--
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
H

HONYAKUKA

Beth:

Thanks for your reply, and sorry for the delay.

I followed your instructions. The problem still occurs. You said you had
another possibility?

Thanks.

Jay
 
B

Beth Melton

Hi Jay,

That possibility didn't pan out as I had hoped. :-(

If the error still occurs when you start Word using the /a switch then
the only advice I can provide at this time is to watch
http://office.microsoft.com/home/default.aspx and check for updates.
--
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
H

HONYAKUKA

Beth:

OK, thanks.

As a workaround, I added a line of code to keep the active document activated.
(Even when, during the running of the code, the window switches to another
document, the document on which I was originally running code remains the
"active document", as I found by setting a Watch within the macro.)

Jay
 
B

Beth Melton

Hi Jay,

I'm not sure if you are following this thread but, the 'possibility' I
mentioned previously is now a reality. :)

When I tested your code I had a beta version of Office 2003 SP-1
installed. Since I was unable to duplicate the scenario I suspected
this could be corrected in the patch. But, of course, since it wasn't
publicly available at that time I was unable to convey that
information to you.

So... you might try downloading the Office 2003 SP-1 patch which was
released today and see if the error still occurs. If it still occurs
and if you are unhappy with your workaround solution we can revisit
this topic and try some additional troubleshooting.

--
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.
~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
H

HONYAKUKA

Beth:

I downloaded Office 2003 SP-1, removed my workarounds, and unchecked Tools >
Options > View tab > Windows in Taskbar. So far, SP-1 seems to have fixed the
problem. The active document remains in focus.

Thanks for all your help.

Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top