Substitute for Blue background, white text in Word 2010
-
- SilverLounger
- Posts: 2391
- Joined: 28 Mar 2010, 01:49
Re: Substitute for Blue background, white text in Word 2010
The issue is not with respect to creating a new module. Rather, it is that all of my modules are gone and I don’t know what happened to them. The last time I checked, I remember a Modules folder in the Visual Basic left-hand-side tree view, and it had 6 modules in it. Now they are all gone.
Regards,
JMT
JMT
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Substitute for Blue background, white text in Word 2010
Is the tree view not possibly collapsed? Try double clicking Normal to expose the module folders?
Another possibility is that you did not save the Normal Template when you exited Word. If you change the Normal Temp and close Word it will prompt you to save the current open doc, and then it will prompt a second time asking if you want to save changes to the Normal template. Maybe you dismissed the warning without choosing Yes??
Another possibility is that you did not save the Normal Template when you exited Word. If you change the Normal Temp and close Word it will prompt you to save the current open doc, and then it will prompt a second time asking if you want to save changes to the Normal template. Maybe you dismissed the warning without choosing Yes??
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Substitute for Blue background, white text in Word 2010
By default, Word will *not* prompt to save Normal.dotm but save it automatically if it has changed. To have Word prompt, you need to tick a check box in File | Options, category Advanced, section Save:
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Substitute for Blue background, white text in Word 2010
Mine was set to prompt. I didn't realize that the default setting was that it does not prompt? Anyways, it was just another thought that occurred to provide JMT with troubleshooting options...
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- SilverLounger
- Posts: 2391
- Joined: 28 Mar 2010, 01:49
Re: Substitute for Blue background, white text in Word 2010
I believe there used to be a Modules subfolder under Normal. Per the below screenshot, there is no longer such a folder. It seems I have lost all 6 (?) of my Modules. I don’t think it is hidden because there is nothing for me to expand. I also think that whatever issue I am facing is related to the "Sub or folder not defined” error message I was getting before.
Word did crash earlier today, but upon reloading, I instructed Word to keep my changes to the Normal template.
Word did crash earlier today, but upon reloading, I instructed Word to keep my changes to the Normal template.
You do not have the required permissions to view the files attached to this post.
Regards,
JMT
JMT
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Substitute for Blue background, white text in Word 2010
Your screenshot shows that the modules have indeed been lost. I have no idea why you have so many problems with Word.
I'd create a module, copy the code that you need into it, then save the Normal template - you can use the Save button on the toolbar in the Visual Basic Editor for this purpose. Then quit Word and immediately make a backup copy of Normal.dotm. If you lose the macros again, you can restore the backup copy.
I'd create a module, copy the code that you need into it, then save the Normal template - you can use the Save button on the toolbar in the Visual Basic Editor for this purpose. Then quit Word and immediately make a backup copy of Normal.dotm. If you lose the macros again, you can restore the backup copy.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2391
- Joined: 28 Mar 2010, 01:49
Re: Substitute for Blue background, white text in Word 2010
I believe the error that I reported in the earlier post was due to Word crashing. The computer may have been confused as I had several large files open based on different templates and was performing a heavy operation. Perhaps Word was unable to handle the operation and reacted by deleted my macros. I was able to restore a copy of Normal.dotm from last week's backup and get things back in order though.
Regards,
JMT
JMT
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Substitute for Blue background, white text in Word 2010
I'm glad you were able to restore Normal.dotm. If you added/modified macros after restoring, I'd create a new backup, to be on the safe side.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2391
- Joined: 28 Mar 2010, 01:49
Re: Substitute for Blue background, white text in Word 2010
The AutoNew macro causes all of my documents to open with a blue background. Is there a way to disable that macro for certain documents? I have already tried to toggle off the blue background, but even then, when I reopen the document, it comes up with a blue background.
I have considered deleting AutoNew as a macro in the document in which I am trying to disable blue background, but then I think I may inadvertently remove it from Normal.dot, which is not what I want to do.
I have considered deleting AutoNew as a macro in the document in which I am trying to disable blue background, but then I think I may inadvertently remove it from Normal.dot, which is not what I want to do.
Regards,
JMT
JMT
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Substitute for Blue background, white text in Word 2010
If you are opening existing documents, then its not AutoNew that is making the doc blue, but rather AutoOpen, which triggers when you open an existing document. AutoNew only triggers when you create a new "blank" document.
To avoid the macro changing the background, one can add a prompt to allow you to choose if the background must change.
Something like this:
However, this might become frustrating to respond to each time a doc is created or opened. If this is the case, you will need to think of a specific condition that can be evaluated by the macro and change the background if that condition is met.
To avoid the macro changing the background, one can add a prompt to allow you to choose if the background must change.
Something like this:
Code: Select all
Sub AutoNew()
Dim myR As Integer
myR = MsgBox("Change BG to blue?", vbYesNo + vbQuestion)
If myR = vbYes Then
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(0, 51, 102)
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
ActiveDocument.ActiveWindow.View.DisplayBackgrounds = True
End If
End Sub
Sub AutoOpen()
Dim myR As Integer
myR = MsgBox("Change BG to blue?", vbYesNo + vbQuestion)
If myR = vbYes Then
ActiveDocument.Background.Fill.ForeColor.RGB = RGB(0, 51, 102)
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
ActiveDocument.ActiveWindow.View.DisplayBackgrounds = True
End If
End Sub
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Microsoft MVP
- Posts: 1320
- Joined: 24 May 2013, 15:33
- Location: Warminster, PA
Re: Substitute for Blue background, white text in Word 2010
If you hold down the Shift key while opening a document, either by double-clicking a shortcut to the document or by using the File > Open dialog, that will prevent the Auto macro from running.jmt356 wrote:Is there a way to disable that macro for certain documents?
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Substitute for Blue background, white text in Word 2010
Forgot about that oneJay Freedman wrote:If you hold down the Shift key while opening a document, either by double-clicking a shortcut to the document or by using the File > Open dialog, that will prevent the Auto macro from running.
I use this option often with Access, to prevent Splash screens,Startup forms and Access hiding the nav. pane. Skipped my mind that it can be used in Word too.
Cheers
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- SilverLounger
- Posts: 2391
- Joined: 28 Mar 2010, 01:49
Re: Substitute for Blue background, white text in Word 2010
Is it possible to apply the AutoNew and AutoOpen macros to only certain templates such that documents linked to different templates do not open up with blue backgrounds?
If I delete AutoNew and AutoOpen by going to Tools | Macros while I am in my document, will it only delete them for my particular document or for all of the documents that are linked to the template?
If I delete AutoNew and AutoOpen by going to Tools | Macros while I am in my document, will it only delete them for my particular document or for all of the documents that are linked to the template?
Regards,
JMT
JMT
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Substitute for Blue background, white text in Word 2010
If you want the macros to run only in documents based on specific templates, you should copy the macros into those templates, and remove them from your Normal.dot(m) template.
If you have a template containing the macros, and if you create a document based on that template, the macros are NOT copied into the document. The document calls the macros in the attached template. And if you delete the macros, you delete them from the template, thereby making them unavailable to ALL documents based on that template.
If you have a template containing the macros, and if you create a document based on that template, the macros are NOT copied into the document. The document calls the macros in the attached template. And if you delete the macros, you delete them from the template, thereby making them unavailable to ALL documents based on that template.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 2
- Joined: 23 Oct 2014, 17:16
Re: Substitute for Blue background, white text in Word 2010
The macro submitted in 2013 works perfectly
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Substitute for Blue background, white text in Word 2010
Welcome to Eileen's Lounge...
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- NewLounger
- Posts: 2
- Joined: 23 Oct 2014, 17:16