MS Office Forum / Word / Menus and Toolbars / February 2006
Cascading Windows
|
|
Thread rating:  |
Joanne - 11 Feb 2006 13:32 GMT System: Dell Opti Flex, 1gb memory, winxp pro, MSoffice 2003
I use a macro called 'get files' to open 50 text files at a time - here is the code for the macro, to which I have made no changes:
Public Sub GetFiles()
'Application.CommandBars("Main Menu").Visible = False Dim Resumes As String, FileArray() As String, Num As Long, OpnFile As Long Dim PassNum As Integer, temp As String 'sorting variables Dim Upper As Long 'Upper boundary of array ReDim FileArray(150) Num = 0 'Setting counter to 0 OpnFile = 0 'Setting counter to 0 Resumes = Dir$("C:\1\ceweekly\*.*") 'Where the files are at Do While Len(Resumes) > 0 ' Loop to put files into an array FileArray(Num) = Resumes Num = Num + 1 Resumes = Dir$ Loop ReDim Preserve FileArray(Num - 1) Upper = UBound(FileArray)
' Sort array WordBasic.SortArray FileArray
' Open the files for editing For OpnFile = 0 To 49 If OpnFile <= Upper Then 'if there are files in the array Documents.Open FileName:="C:\1\ceweekly\" _ & FileArray(OpnFile) 'then open the next one and increment counter ActiveWindow.ActivePane.View.Zoom.Percentage = 118 End If If OpnFile = -1 Then Application.Quit End If Next
End Sub
Until today, the files would open on top of each other on the screen and in a 'group' in the taskbar. Now all of a sudden the files are opening in 'cascading windows' which causes me to do a lot of extra clicking and window moving so that the files are not on top of my other 2 apps that I am running to process the files. I want them to open in msword 2003 (which is living only on the top 50% of my screen and allowing me to use the bottom 50% for the other 2 apps). I don't remember making any changes anywhere and so I can't figure out how to get this to work as it was before today, MSWord owns top of screen, other apps own bottom of screen and all files open on top of each other with no cascading down the screen. Can someone please help me get this fixed? I tried using the ApplicationWindowState and chose 'minimize', but then I have to click them one at a time to get them on the screen again and they come back in their cascaded position, leaving me with my other apps behind them again. Don't know what else to try. Thanks for your time and help Joanne
Tony Jollans - 11 Feb 2006 16:58 GMT I suspect you have got "Windows in Taskbar" set.
Have a look under Tools > Options > View tab and uncheck the option.
-- Enjoy, Tony
> System: Dell Opti Flex, 1gb memory, winxp pro, MSoffice 2003 > [quoted text clipped - 58 lines] > Thanks for your time and help > Joanne Graham Mayor - 12 Feb 2006 07:41 GMT Tony has identified the likely cause, but as this may happen again (Word 2003 can do that), it would be worth adding the line Application.ShowWindowsInTaskbar = True to your macro to ensure it is correct each time you run it.
 Signature <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP
My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> System: Dell Opti Flex, 1gb memory, winxp pro, MSoffice 2003 > [quoted text clipped - 58 lines] > Thanks for your time and help > Joanne Tony Jollans - 12 Feb 2006 09:21 GMT Graham,
I've been suspicious for some time that Word 2003 changes settings all by itself but I usually put it down to user error as I routinely change all manner of my own settings (just to see the effect).
Is there anything known about this? Are any particular settings more susceptible than others? Does any particular type of action, or document, tend to cause it?
-- Enjoy, Tony
> Tony has identified the likely cause, but as this may happen again (Word > 2003 can do that), it would be worth adding the line [quoted text clipped - 71 lines] > > Thanks for your time and help > > Joanne Graham Mayor - 12 Feb 2006 12:17 GMT After finding that some of my options changed for no good reason following the upgrade to 2003, I simply added a list of preferences to my autonew and autoopen macros. I know others are having problems too. I suspect it is an extension of the minor corruptions in the Word data key in the registry that has plagued Word with (for example) toolbar disappearances and sundry other issues.
Even more annoying it seems that some users suffer problems with different settings, probably because of the way they use Word, so it is difficult to tie it down. FWIW the issues that affect me are corrected with:
Sub AutoNew() ActiveWindow.ActivePane.DisplayRulers = True ActiveWindow.ActivePane.View.ShowAll = False ActiveWindow.DisplayHorizontalScrollBar = True ActiveWindow.DisplayVerticalScrollBar = True With ActiveWindow.View .Type = wdPrintView 'sets print layout view '.Type = wdNormalView 'alternative for normal view .Zoom.Percentage = 500 'fixes shrunken cursor issue .Zoom.Percentage = 100 .FieldShading = wdFieldShadingWhenSelected .ShowFieldCodes = False .DisplayPageBoundaries = True .ShowDrawings = True End With CommandBars("Reviewing").Visible = False CommandBars("Drawing").Visible = False CommandBars("Forms").Visible = False End Sub
Sub AutoOpen() 'add docname and path to title bar ActiveWindow.Caption = ActiveDocument.FullName ActiveWindow.ActivePane.DisplayRulers = True ActiveWindow.ActivePane.View.ShowAll = False ActiveWindow.DisplayHorizontalScrollBar = True ActiveWindow.DisplayVerticalScrollBar = True With ActiveWindow.View .Type = wdPrintView .Zoom.Percentage = 500 .Zoom.Percentage = 100 .FieldShading = wdFieldShadingWhenSelected .ShowFieldCodes = False .DisplayPageBoundaries = True .ShowDrawings = True End With End Sub
Sub AutoExec() CommandBars("Reviewing").Visible = False CommandBars("Drawing").Visible = False CommandBars("Forms").Visible = False CommandBars("Mail Merge").Visible = False Application.OnTime _ When:=Now + TimeValue("00:00:01"), Name:="CodesOff" End Sub
Sub CodesOff() On Error GoTo oops: ActiveWindow.ActivePane.View.ShowAll = False oops: End Sub
 Signature <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP
My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
I have even considered recording all my preferences in these macros, but so far it is only the ones raised here that cause me concern - especially the rulers, the field codes and the drawings.
> Graham, > [quoted text clipped - 81 lines] >>> Thanks for your time and help >>> Joanne Tony Jollans - 12 Feb 2006 13:54 GMT Thanks, Graham,
I will try and take more note of what I think gets changed and what I might have been doing.
-- Enjoy, Tony
> After finding that some of my options changed for no good reason following > the upgrade to 2003, I simply added a list of preferences to my autonew and [quoted text clipped - 157 lines] > >>> Thanks for your time and help > >>> Joanne Joanne - 13 Feb 2006 12:53 GMT Graham Thank you so much for the info and the coding to avoid some of these problems. Joanne
>After finding that some of my options changed for no good reason following >the upgrade to 2003, I simply added a list of preferences to my autonew and [quoted text clipped - 59 lines] >oops: >End Sub Beth Melton - 15 Feb 2006 17:39 GMT Hi Tony,
I have a different 'take' on this issue than others. :-)
Changes to the defaults are typically attributed to a third-party add-in or template. So if you notice your settings have been changed then that's the first place to start looking. There are a LOT of add-ins and templates out there that modify Tools/Options along with various preferences. For example some of the Resume templates created by Microsoft will turn table gridlines off, field shading, non printing characters, field codes, etc. Others may turn on the Drawing Grid, force the view as Print Layout etc.
Nothing can simply 'magically' change nor is Word 2003 more susceptible to corruption than previous versions. It's a computer program - it does what it is 'told' to do. Personally, I find it to be the most stable of all the versions released. I suspect the reason we encounter this issues more is because of the growing number of add-ins along with the availability of templates for Word.
Any time I've ever encountered a change in my preferences I've always found an add-in or template to be the cause. Granted that requires a little effort to open templates and check the code, or in the case of an add-in and you can not view the code due to a locked project or a COM Add-in, it takes a little experimenting to determine the precise changes that are being made. (But then I'm that oddball who wants to know WHY. <grin>)
Of course, if you don't care to find the exact cause then force the settings you want using a macro. But at the very least, know it is a third-party and not caused by instability. :-)
 Signature Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged.
~~~~~~~~~~~~~~~
Beth Melton Microsoft Office MVP
 Signature Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/
> Graham, > [quoted text clipped - 103 lines] >> > Thanks for your time and help >> > Joanne Tony Jollans - 15 Feb 2006 18:45 GMT Thank you Beth.
It's nice to get a different viewpoint. I think it's easy to use 'corruption' as a reason for something one can't understand - and deleting normal.dot or registry keys tends to (a) get round many issues and (b) hide the evidence. And so the myth continues to gain strength.
I'm not entirely sure I agree that 2003 is more stable than earlier releases but it does handle abends much better so users are less likely to lose work (which is a big improvement) when they happen.
As I said, I usually put it down to user error when no other explanation is obvious. I certainly always like to know why (or at least under what repeatable circumstances) but determining that requires me to remember what I did yesterday - which isn't always easy :-)
-- Enjoy, Tony
> Hi Tony, > [quoted text clipped - 146 lines] > >> > Thanks for your time and help > >> > Joanne Suzanne S. Barnhill - 15 Feb 2006 23:01 GMT Since I *never* turn my ruler off, I refuse to believe that its regular disappearance is user error, and it happens so inconsistently (but in such a consistently predictable way) that I don't think it's due to add-ins, either. What I note is that, if I open a document and find that the ruler is not displayed, then one of two things happens. If I display the ruler, then close that document and open another, the ruler will be displayed. But if I close that document without displaying the ruler and open another, the ruler will not be displayed. The question is what caused the ruler not to be displayed in the first place. I would suspect that this setting might be saved with specific documents, but that would go against everything we've been told about where these display settings are stored.
 Signature Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
> Thank you Beth. > [quoted text clipped - 166 lines] > > >> > Thanks for your time and help > > >> > Joanne Tony Jollans - 15 Feb 2006 23:58 GMT Hi Suzanne,
Reformat of a part of your post to make sure I'm reading it correctly ...
> What I note is that, if I open a document and find that the ruler is > not displayed, then one of two things happens. > If I display the ruler, then close that document and open > another, the ruler will be displayed.
> But if I close that document without displaying the ruler > and open another, the ruler will not be displayed.
Wouldn't that be expected behaviour regardless of what caused the ruler not to be displayed in the first place? And, if so, then all you're really observing is that occasionally the ruler is not displayed upon opening of a document. So ...
Is it always the same document? Or is anything else coincident with, or a presursor to, it? Some code perhaps - whether an add-in or not. or maybe some function of Word?
I do note that setting the ruler on is the first line of Graham's code so he seems to think it is fickle. But I can't say I've ever had a problem with it.
-- Enjoy, Tony
> Since I *never* turn my ruler off, I refuse to believe that its regular > disappearance is user error, and it happens so inconsistently (but in such a [quoted text clipped - 192 lines] > > > >> > Thanks for your time and help > > > >> > Joanne Suzanne S. Barnhill - 16 Feb 2006 00:58 GMT That's what I meant by "consistently predictable." That is, the original behavior is inconsistent and unpredictable, but what happens after that is consistent and predictable. I have the same add-ins loaded every time I use Word (which I start each morning and leave running all day). One of the documents in which I consistently notice it is the document in which I store the URLs I cite here. Half the time (maybe more than half), it opens without the ruler. I usually turn the ruler on before closing it, but of course I don't usually have occasion to save the doc. In addition to the ruler, I see documents opening at strange Zooms.
But the *most* perplexing thing is that, even though I shut down every night with Document1 displayed, in Normal view, with the ruler, about 25% of the time, when I start Word the next morning, it will open in Print Layout view and/or without the ruler. That's what I mean by "unpredictable" and "inconsistent."
 Signature Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
> Hi Suzanne, > [quoted text clipped - 229 lines] > > > > >> > Thanks for your time and help > > > > >> > Joanne Beth Melton - 17 Feb 2006 00:03 GMT Didn't we find the SnagIt add-in as the cause of your ruler and view oddity?
Although I do recall a "Print Preview Ruler bug". If the ruler is turned off in Print Preview then the ruler will also end up getting turned off Normal or Print Layout view. See if these steps reproduce the behavior:
- Create a new document (make sure the ruler is on) - Switch to Print Preview (make sure the ruler is off) - Close Print Preview by clicking the Close button in the upper right corner - Create a new document or open a document
Result: The Ruler will not display in the next opened document window.
If you have the ruler turned off in Print Preview or turn it off then I'd say this is what you are encountering.
 Signature Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged.
~~~~~~~~~~~~~~~
Beth Melton Microsoft Office MVP
 Signature Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/
> Since I *never* turn my ruler off, I refuse to believe that its > regular [quoted text clipped - 234 lines] >> > >> > Thanks for your time and help >> > >> > Joanne Suzanne S. Barnhill - 17 Feb 2006 03:21 GMT Coincidentally, I was just reading Dian's TechTrax article about SnagIt 8, and in it was the first mention I'd seen of problems with the SnagIt add-in. I don't use the add-in so could certainly uninstall it and see if that helps.
 Signature Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
> Didn't we find the SnagIt add-in as the cause of your ruler and view > oddity? [quoted text clipped - 264 lines] > >> > >> > Thanks for your time and help > >> > >> > Joanne
|
|
|